An ionic compound is made of positive and negative ions. The ions do not form separate pairs. Instead they pack together in a lattice, which is a regular arrangement of ions in a repeating pattern that goes on in all directions. This is called a giant ionic lattice.
In sodium chloride, each positive sodium ion is surrounded by negative chloride ions, and each chloride ion is surrounded by sodium ions. The ions are held in place by strong electrostatic forces of attraction between oppositely charged ions. These forces are called ionic bonds, and they act in all directions throughout the lattice.
There are very many strong ionic bonds in a lattice. A lot of energy is needed to overcome them, so ionic compounds have high melting points.