Oxygen has 8 electrons, arranged 1s2 2s2 2p4. Written on the previous noble gas that is [He] 2s2 2p4, and the shells hold 2, 6 electrons from the innermost outwards.
Hund's rule leaves 2 unpaired electrons in the ground state, which is what makes the free atom paramagnetic.
The periodic table, read every way a chemistry course asks for. This tool needs JavaScript; these are the pages it offers: