Carbon...

Carbon has 6 electrons and now we have to decide where to put the 6th electron. Since the three 2p orbitals are at the same energy level, electrons are placed singly into these orbitals until all three orbitals each have one electron. This actually keeps the negatively charged electrons as far apart as possible and that will be a more stable arrangement. Note that now the spins are aligned to maximize the repulsion between the electrons.

The next element is nitrogen.