* K (Potassium) is a metal, and metals tend to lose electrons to form positive ions (cations).
* F (Fluorine) is a nonmetal, and nonmetals tend to gain electrons to form negative ions (anions).
In KF, potassium (K) loses one electron to become a K+ ion, and fluorine (F) gains one electron to become an F- ion. The electrostatic attraction between these oppositely charged ions forms the ionic bond in KF.