In the modern periodic table, each period starts with the filling of a new principal energy level. Sixth period begins with filling of principal quantum number, n = 6.
According to aufbau principle, in the ground state of the atoms, the orbitals are filled in order of their increasing energies. Therefore, in sixth period, electrons enter in 6s,4f,5d and 6p subshells. Total 16 orbitals (2 + 7 + 5 + 3 respectively) are present in these subshells.
According to Pauli's exclusion principle, each orbital can accomodate maximum two electrons, therefore 16 orbitals can have 32 electrons and hence, 6th period have 32 elements.