Ionic compounds usually dissociate in water because water is a polar molecule.
The O atom in water has a partial negative charge. The H atoms have a partial positive charge.
Electrostatic attractions hold the positive and negative ions together in the solid.
When the substance is placed in water, the water molecules pull the positive and negative ions apart from each other. The water molecules attract the ions from the surface of the solid. As a result, the ions move into the water.
The water molecules then surround the ion in an ordered fashion.
Several water molecules will surround a positive ion with their negative oxygens pointed at it.
The water molecules will surround the negative ion with their positive H atoms facing the ion.
This shell of water molecules surrounding the ions in solution stabilizes them and reduces the attractions of the positive and negative ions for each other.
When ionic bonds form, one atom becomes positively charged (+), and the other one becomes negatively charged (-).
Water is a covalent polar compound (it has positive and negative poles). Also, ionic compound tend to form complex lattice networks and structures (see the picture).
When the salt is put in water, the water is pulling #Na^+# on one side and #Cl^-# on the other side. The water molecules can pull hard enough to eventually break each salt molecule away from the lattice, dissolving the crystal structure.
Lets take the ionic formula for Calcium Chloride, #CaCl_2#.
Calcium is an Alkaline Earth Metal in the second column of the periodic table. This means that calcium has 2 valence electrons it readily gives away in order to seek the stability of the octet. This makes calcium a #Ca^(+2)# cation.
Chlorine is a Halogen in the 17th column or #p^5# group.
Chlorine has 7 valence electrons. It needs one electron to make it stable at 8 electrons in its valence shells. This makes chlorine a #Cl^(−1 )# anion.
Ionic bonds form when the charges between the metal cation and non-metal anion are equal and opposite. This means that two #Cl^(−1)# anions will balance with one #Ca^(+2)# cation.
This makes the formula for calcium chloride #CaCl_2#.
For the example Aluminum Oxide #Al_2O_3#
Aluminum has an oxidation state of +3 or #Al^(+3)#
Oxygen has an oxidation state of -2 or #O^(-2)#
The common multiple of 2 and 3 is 6.
We will need 2 aluminum atoms to get a +6 charge and 3 oxygen atoms to get a -6 charge. When the charges are equal and opposite the atoms will bond as #Al_2O_3#.