How is an ionic substance formed?
Ionic compounds are formed as the result of the formation of positive and negative ions.
The atom which forms a positive ion loses electrons to the atom which gains electrons to form a negative ion. A compound is not stable unless the number of electrons which are lost and gained are equal .So opposite charge attract each other and this is the force which make them to stay together.
If u have any doubt remain u can ask me for more detail.