In bond formation, there are two types of electron-pair bond pairs and lone pairs. The electron pair which do not involve in bond formation are known as lone pair or nonbonding electrons. The bond pairs are involved in bonding and make covalent or coordinate bonds.
In Oxygen, the electric configuration is . There are six valence electrons in the outermost shell and hence, there are three electron pairs in the Oxygen atom.
The one electron pairs are involved in two bond formation while two electron pairs are there which do not participate in bonding.