Atoms
The periodic table was organized and updated many times before anyone knew what the elements actually were. Now scientists know that atoms consist of heavy nuclei surrounded by light electrons. The nuclei are composed of protons and neutrons. Protons are positively charged, neutrons have no charge, and electrons are negatively charged. The number of protons matches the number of electrons.
The Periodic Table
When Mendeleev first set up his periodic table, he organized the elements by atomic weight. The atomic weight is the mass of an element compared to the mass of a hydrogen atom. What Mendeleev had noticed was that the chemical properties of the elements repeated as a function of atomic weight. For example, neon has an atomic weight of 16 more than the chemically similar helium, and silicon has a weight of 16 more than the chemically similar carbon. So even though neon is closer in atomic weight to carbon than it is to helium, the properties are more similar to the elements that are more different in weight. It turns out this was a kind of coincidence, and it's really the atomic number that's responsible.
Atomic Number
All atoms are exactly the same --- electrons around nuclei. The difference is only in number: how many protons, electrons and neutrons make up an atom. The atomic number is a direct measure of that difference. The atomic number is simply the number of protons in the nucleus. For the smaller atoms, the number of protons and the number of neutrons are the same. That's why the atomic weight shows some periodicity. Because even though the properties depend upon atomic number, for the light atoms the atomic weight goes up regularly as the atomic number goes up. For the heavier atoms, the number of neutrons is not quite as well ordered, which is why the modern periodic table is organized by atomic number.
Atomic Number and Chemical Properties
Why do the chemical properties depend on atomic number? That goes back to the fact that the number of electrons is the same as the number of protons. The rules of quantum mechanics force the electrons to hang around the nuclei only in certain places, called orbitals. As more electrons get added, inner orbitals get filled up, and the electrons have to go to outer orbitals. But the outer orbitals repeat the shapes of the inner ones. Since those electrons govern how the atom interacts, the chemical properties repeat if the same shaped orbitals are at the outermost level. That's why atomic number --- the number of protons --- dictates chemical properties.