the electronic configuration of an atom with eight electrons is 1s²2s²2p⁴. the orbital diagrams are shown in the figure.
as per the hunds rule:
1. electrons tend to avoid being in the same orbital as per as practicable.
2. electrons in different orbitals of the same energy will have their spin parallel.
this can be illustrated from the multiplicity of the orbitals of the atom. as there are four electrons in the p orbital and p orbital has 3 sub-shells. the electrons can be fed in different ways as shown in the figure but the correct orbital diagram will be as per the hunds rule.