It is easier to answer to your question by explaining how domains form.
There's a few interaction at play here: magnetostatic energy, magnetic dipolar interaction and exchange interaction.
Essentially imagine you start with a large magnet (with a certain magnetostatic energy). It can be favourable to split the magnet in two domains with different magnetisation. A magnetic dipolar energy arises, but the magnetostatic energy is lowered and it is usually a good tradeoff as the energy of the system is lowered. Now each of these two domains can split for the same reason. And so on...
This tells us there will be a certain point at which it is no longer favourable to split the domains, because the dipolar energy that increases is larger than the lowering of the magnetostatic energy.
On the other hand, exchange interaction (which is short-ranged) tends to align adjacent magnetic moments. Because of this having domain walls will have a certain energy cost.
The bottom line is that domains form in order to minimise energy. As long as you are below the critical temperature known as the Curie temperature, once the domains are formed they last. They form in such a way that exchange interaction is only signifcant inside that domain, and it is surrounded by a wall which acts as an "energy barrier".