Before 1910, scientists had the idea that the positive charge and mass of an atom were evenly distributed throughout the whole atom. This was known as the plum-pudding model.
Ernest Rutherford’s lab, in their famous alpha particle scattering experiment, tested the prevalent idea of internal structure of atom by firing an alpha particle beam through a piece of thin gold foil, but the evidence resulting from that experiment was a complete surprise: most of the alpha particles passed through the gold foil without changing direction much as expected, but some of the alpha particles came bouncing back, almost in the opposite direction, as though they had struck something dense, solid and of similar charge in the gold foil. If the gold atom were really like the one described by the plum-pudding model, all of the alpha particles should have passed through the foil, but that did not happen.
The scattering data was consistent with a small positive nucleus which repelled the incoming positively charged alpha particles. Rutherford worked out a detailed formula for the scattering, which matched the experimental datato high precision. Thus came the idea of positively charged nucleus of atom.