An ionic compound is a giant structure of ions. The ions have a regular, repeating arrangement called an ionic lattice. The lattice is formed because the ions attract each other and form a regular pattern with oppositely charged ions next to each other.
Remember that the lattice arrangement is giant - for example, a single grain of salt may contain 1.2 × 1018 (1,200,000,000,000,000,000) ions. The lattice arrangement continues in three dimensions. This is why solid ionic compounds form crystals with regular shapes.
Different types of model are used to represent giant ionic structures. Each has its advantages and limitations. For example: