Ionic compounds are formed when there is a donation of an electron from one element to another that receives the electron. This causes the donating atom to attain a positive charge and the receiving atom to attain a negative charge. The ions are held by strong electrostatic forces that hold them in a fixed state.