Potassium (K) easily loses its one valence electron, becoming a positively charged ion (K+). Chlorine (Cl) readily gains one electron to complete its octet, forming a negatively charged ion (Cl-).
This attraction between oppositely charged ions is called an ionic bond.
Therefore, potassium and chlorine will form an ionic bond to create potassium chloride (KCl).