How is electronegativity used in determining the ionic or covalent character of the bonding between two elements?
Electronegativity is the tendency of an atom to attract electrons when bonded. If two atoms have similar values for electronegativity they share electrons equally in a covalent bond as electrons aren't attracted more to one atom than the other. If their electronegativity values are very different the bond will be ionic because the bonding pair of electrons will mostly be associated with one atom and not the other.
Chemical bonds fall along a spectrum from pure ionic to pure covalent, with most being somewhere in between. Polar Covalent is the name used to describe bonds that have both ionic and covalent character because the electrons are shared unequally. The Pauling Scale is used to assign electronegativity to atoms. It ranges from to 4.00 (fluorine). I've attached an image of the Pauling Scale.
Below is an approximate breakdown of types of bonds bases on electronegativity difference. These values vary from textbook to textbook and instructor to instructor, so be sure to find out which scheme your instructor wants you to use.
non-polar covalent: 0.2-0.4
polar covalent: 0.5-1.6
ionic: 1.7 and up (Can be as high as 2.1 and up in some textbooks.)
As an example, hydrogen has an electronegativity of 2.1 and chlorine has an electronegativity of 3.0. Their difference is 0.9, making the bond polar covalent.