Ideas about the atom changed as new evidence was found. The plum pudding model was a ball of positive charge with electrons spread through it. The alpha particle scattering experiment showed that the mass and positive charge are in a tiny nucleus and that most of the atom is empty space. Bohr then placed the electrons in shells at fixed distances, and Chadwick gave evidence for neutrons.
The atomic number is the number of protons. The mass number is the number of protons plus neutrons. Isotopes are atoms of the same element with different numbers of neutrons. They react in the same way because they have the same electronic structure.
Electrons fill the shells in order: up to 2 in the first shell, then 8, then 8.