Ionic compounds are formed when atoms transfer electrons between each other, resulting in charged particles called ions. Typically, this occurs between metals and nonmetals, where metals lose electrons to become positively charged cations, and nonmetals gain electrons to become negatively charged anions. The electrostatic attraction between these oppositely charged ions creates a strong bond, resulting in a stable compound.
These compounds often have high melting and boiling points due to the strong ionic bonds. They usually dissolve well in water and can conduct electricity when dissolved or melted, as the ions are free to move. Common examples include table salt sodium chloride and magnesium oxide.