Spikes on ferrofluid? What exactly are the spikes, or peaks and valleys, caused by in pictures such as these

Wikipedia states that "From the point of view of magnetic energy, peaks and valleys are energetically favorable", but I'm not exactly sure what that means, or how it works. Why isn't the fluid just happy being attracted to the magnet in a semi-sphere shape? Could it be that it gains a magnetic charge, so it attempts to repel itself at the same time? Just pulling at straws here.
 A: The shape is caused by normal-field instability.  This is the condition where these small 10nm droplets of ferrofluids are described by Maxwells equations where the divergence of the B field is zero and the curl of H is zero.  The imposed magnetic field leads to a stress condition mismatch at the interface between the internal of the droplet and the outside.  This excess pressure causes the droplets to elongate in the direction of the magnetic field.  The inter-peak spacing is approximately given by the Taylor wave-length for regular hydrodynamic instabilities, but the peak amplitude is a function of field intensity.
This elongation can be seen in a variety of ways.  In an example where the ferrofluid is less dense and the field strength is lower you can see the simple elongations occur.

In more dense or higher field conditions you can see the stress and deformations take on a more rugged shape as they crowd together along field lines of equal strength.  This gives it a spiked appearance.

A: It helps to remember that ferrofluid is simply a suspension of iron-containing particles. The shape you see is the iron particles attempting to follow the magnetic field lines, just like iron filings around a magnet (in 3D, rather than on a surface as is commonly demonstrated). The shape is not exactly the same as iron filings around a magnet, because of the surface tension of the liquid.
In a bit more detail: magnetic force on suspended particles throughout the material leads to a net force at the surface, where the magnetic permeability drops off. This causes a force normal to the surface, which results in a protrusion of fluid. As the protrusion grows, the surface is stretched, increasing surface tension force until it is strong enough to balance out the magnetic normal force. The equilibrium shape is therefore a peak, which is taller and thinner when the field is stronger.
Why do these peaks form in some parts of the fluid, while others are left as valleys?
The places where peaks form are essentially random, nucleated by any small bump in the fluid surface, which will then grow. That is why they are called "instabilities", since a perfectly stable surface would not have any preferential position to form a peak (though there are no perfectly stable surfaces in reality).
