How is the atomic number used to distinguish between elements?
The behaviour of an atom - the type of element it is - is determined by the electronic structure, which is in turn determined by the atomic number.
Normal matter is arranged in combinations of electrons, protons and neutrons. These are known as atoms where the type of atom, or element, is determined by the atomic number. The atomic number tells us the number of protons the atom has.
The periodic table is a way of categorizing all of these different types of atoms, where they are ordered by their atomic number. The behaviour of an atom is determined by the electronic structure, which is in turn determined by the atomic number.
We use the number of protons, since this is very difficult to change, whereas an element may gain or lose a few electrons causing it to be charged. When it is charged, it is called an ion, but it is still the same element.
The number of neutrons varies slightly for elements of the same type, especially for elements with a lot of protons. To be stable, there is a "normal" number of neutrons which is somewhere around two times the number of protons.