An ionic bond can be formed after two or more atoms loss or gain electrons to form an ion. Ionic bonds occur between metals, losing electrons, and nonmetals, gaining electrons. Ions with opposite charges will attract one another creating an ionic bond.