Sorry the question is vague, I don't know what the name of the theory is that describes this so I don't know what to google. No need to explain anything just link me the wiki page pls.
The energy to flip a single spin is the interatomic exchange interaction $J$ times the number of magnetic neighbors. If you want a wikipedia article, this might be useful: https://en.wikipedia.org/wiki/Ising_model
Or this one: https://en.wikipedia.org/wiki/Superexchange
The best way to measure these energies directly used to be inelastic neutron diffraction. Now there is also inelastic x-ray scattering.