A covalent bond is a shared pair of electrons held between two nuclei by mutual electrostatic attraction. Covalent bonding occurs mainly between nonmetal atoms, whose electronegativities are similar and high, so neither atom transfers electrons outright. Instead each atom contributes electrons to a shared region, allowing both to attain a stable, often noble-gas, configuration. The attraction of both nuclei for the shared pair is what holds the atoms together, and the bond length settles where the attractive and repulsive forces balance at minimum potential energy.
Lewis, or electron dot, structures are a bookkeeping tool for tracking valence electrons. To draw one, count the total valence electrons from all atoms, arrange the atoms with the least electronegative usually in the center, con