Covalent bonds form when electrons are shared between two elements that have close electronegativity, so neither element takes or loses electrons. Ionic bonds form when a metal takes electrons from a nonmetal, giving the metal a positive charge and the nonmetal a negative charge so they are attracted. Covalent bonds form between nonmetals and have low melting points, while ionic bonds form between metals and nonmetals and have high melting points due to the strong electrostatic forces between the ions.