How does ionic bonding work and what is the structure of an ionic compound?

A Level