Explain why third period has eight and not eighteen elements
The Period Three of the periodic table consists of the elements whose atoms has three shells occupied by electrons in its Ground State (when it is not excited or in a reaction)
According to the Aufbau's Principle (the building up principle) there can be only EIGHT elements that satisfy this. This is because the S orbital of the fourth shell sits at a lower energy level (closer to the nucleus) than the d orbital of the third shell. Therefore when the s and p orbitals of the third shell has been filled the next element (K) has its outer most electron in the S orbital of the fourth shell. Hence it is in period 4.
According to the Aufbau's principle as you list the elements in increasing order of atomic number a single electron gets added to their electronic configuration one by one to the orbital with the lowest energy level possible.