Elements on the periodic table belong to groups and periods. The groups of the periodic table are the columns. The periods of the periodic table are the rows.
TL;DR (Too Long; Didn't Read)
Elements of the same period share the same principal quantum number, which describes both the size and energy of an atom's outermost electron shell.
The electrons of an atom orbit the nucleus in a fuzzy cloud governed by probability. It can be useful, however, to think of electron orbits as rigid shells containing a number of different possible electron orbitals. As an atom's atomic number increases, its shells must accommodate an increasing number of electrons. The outermost shell is called the valence shell; the period number refers to this shell.
The layout of an electron's possible position in an atom is governed by quantum numbers. The principal quantum number, n, corresponds to the size and energy of electron shells. It can have nonzero integer values: 1, 2, 3 and so on. As numbers increase, both the size and energy of the electron shell increase. The second quantum number, l, corresponds to the shape of the orbitals within a shell. These numbers are typically referred to by their corresponding letters: 0=s, 1=p, 2=d and 3=f. The value of l can range between zero and n-1. For example, if an electron has a principal quantum number of 2, it could exist in one of two different orbital shapes, s or p. The third quantum number, m, corresponds to the orientation of the orbitals. The third quantum number must always be between -l and +l. Therefore, there is one s-orbital, three p-orbitals, five d-orbitals and seven f-orbitals.
Adding Electrons and Moving Across the Periodic Table
A single pair of electrons fills an orbital. Hydrogen has one electron, so that occupies the first orbital: 1s. Helium has two electrons, both of which still fit in the 1s orbital. The next element, lithium, has three electrons. The first two fit in the 1s orbital. The third electron, however, must be in a new orbital. The principal quantum number 1 restricts the second quantum number to zero, which in turn means the third must be zero as well. Therefore, all of the space of associated with the first shell is taken up. The next electron must exist in a new shell and orbital: the 2s orbital. This means that the principal quantum number has increased; the element must be in a different period. As expected, lithium begins group 2 of the periodic table, as its valence shell has a principal quantum number of 2.
Atomic Radius Trends
Atoms do not change principal quantum numbers as you move from left to right across the periodic table. Therefore, the electrons all exist at roughly the same distance from the nucleus. More protons, however, are added. This creates a greater positive charge at the nucleus, resulting in a greater inward pull on electrons. Hence, the atomic radius, or the distance from the nucleus to the outermost edge of the atom, actually decreases as you move across a period. On the other hand, as you move down the periodic table the period number increases. The principal quantum number increases and therefore the electron cloud increases in size. In turn, the atomic radius increases as you move down the periodic table.