The classification of Group and Period are totally related to the electron arrangement of the atoms. As shown in the table above, the classification of elements in a periodic table is as follows:
All the elements in the same group have an equal number of valence electron(s) (outer most electron)
All the elements in the same period have an equal number of electron shell(s) (orbit).
For example, the electron arrangement of calcium is 188.8.131.52. It has 2 valence electron and 4 electron shell. Therefore, it is placed in Group 2, period 4.
Hydrogen, the simplest element atom, with 1 electron, does not fit into any group. (Even though some of the periodic table place it in Group 1, due to its 1 (and the only one electron) valence electron.