Covalency occurs when an element shares electrons with other atoms of the same or different elements to achieve a stable chemical state.
The covalency of an atom is equal to one if it shares one electron.
Its covalency is two if it can share two electrons.
Examples
Fluorine's Covalency: Fluorine possesses seven valence electrons. It can share one electron with another atom of to produce , or it can share one electron as the atomic number of fluorine is 9 so it have only one valence electron which shares with another atom to complete its octet to form , hence its covalency is 1.
Nitrogen's Covalency: Nitrogen has 5 valence electrons. To complete its octet, it requires three electrons. It can share three valence electrons with the nitrogen atom to form, resulting in a stable electrical state. Nitrogen has a covalency of 3.