The more electronegative an atom is, the more strength it has to pull electrons closer to itself. If one atom is highly electronegative and the other is barely electronegative then an ionic bond will form. If one is highly electronegative and the other is slightly electronegative, then a polar covalent bond will form. If they are both the same electronegativity then a nonpolar covalent bond will form.