The "highest occupied energy level" means the energy level in which the valence electrons reside. Elements follow the octet rule, meaning they want to attain the stable arrangement of having eight electrons in their highest occupied energy level. Some atoms want to give up electrons, and others want to gain electrons to become more stable.
Valence electrons exist only in the s and p orbitals of the highest energy level. The Aufbau principle states that electrons must fill the lowest energy levels first before moving to the next energy level. Each energy level has a specific number of orbitals; only two electrons spinning in opposite directions can fill each orbital. Electrons exist at different distances from the nucleus of the atom. Those electrons occupying orbitals closer to the nucleus have lower energy than those orbiting farther away.
The most stable elements on the periodic table, the noble gases, have eight electrons in their highest occupied energy level; the noble gases do not readily form compounds with other elements. The electrons in the highest occupied energy level have a lot to do with the reactivity of the element. Elements such as the metals with few electrons in their highest energy levels want to donate them to other elements. Elements like the nonmetals have almost a full complement of eight electrons in their outermost energy levels, so they want to gain electrons from elements.