An ionic compound is a special kind of chemical that is made up of little particles called ions. These ions are like tiny magnets that can attract and stick to each other. One type of ion is positively charged, and the other type is negatively charged. When the positively charged ions and the negatively charged ions stick together, they form a crystal.
Imagine that you have a box full of red magnets (positively charged ions) and a box full of blue magnets (negatively charged ions). If you pour the two boxes together, the red magnets and blue magnets will stick together to form a big pile. This is like how ions stick together to form an ionic compound.
One example of an ionic compound is table salt, which is made up of positively charged sodium ions and negatively charged chloride ions. When you sprinkle salt on your food, the sodium and chloride ions stick together and dissolve in your mouth. Yum!