Do all ionic compounds dissolve in water?

Most ionic compounds dissolve in water because the process is thermodynamically favourable and kinetically accessible.
The first example that springs to mind is sodium chloride:

NaCl(s) + aq → NaCl(aq), i.e. Na+(aq) + Cl(aq)

There are notable exceptions: ionic compounds containing highly polarising ions (ones that are small and have a high charge) will usually not dissolve in water, but rather react with it, or just not dissolve at all.

Oxides are the most common example.
For example, consider what happens if you try to dissolve sodium oxide (Na2O, i.e. [Na+]2[O2−]) in water:

You might expect to see the same thing as with NaCl, namely water dissolving and solvating the constituent ions in Na2O:
Na2O(s) + aq → 2Na+(aq) + O2−(aq)

What is actually observed is the oxide ion deprotonating water to form an aqueous solution of sodium hydroxide:
Na2O(s) + H2O(l) → 2Na+(aq) + 2[OH](aq)

Other ionic compounds that don't dissolve in water without reacting include: