Ionic compounds consist of positively charged cations and negatively charged anions held together by ionic bonds. Common examples include sodium chloride (NaCl), where sodium atoms form Na+ ions by losing electrons and chloride atoms form Cl- ions by gaining electrons, resulting in an electrostatic attraction between the ions to form the solid ionic compound. Ionic compounds generally have high melting and boiling points and are soluble in water.