Hi,
I'm probably a little late for the purposes of your Physics class, nevertheless I'll respond and hopefully satisfy your curiosity...without being overly technical and detailed. To start, the Levitron does not defy Earnshaw's Theorem; it works around it. The spinning of the top adds a dynamic aspect, that is, the spinning top is not part of a static system; thus there is no violation of theorem. Going a bit further, while the top's spinning prevents its flipping over, it does something else: it prevents it from exiting the levitation field through sideward motion. This probably sounds a little strange, but there is something more to the top's rotation than meets the eye. There is a natural tendency for that rotation to be more-or-less wobbly. The technical name for this wobbling motion is "precession", but "wobble" will do. If the top were to spin perfectly smoothly such that the rotation of its ring magnet remained essentially planar, it would simply move outward from the center of the levitation field and crash to the side. The wobble, in effect, tilts the top's magnet to and fro (ultimately in every direction, through 360 degrees). When the top's magnet tilts, its field interacts with the field of the base magnet in such a way as to create resistance to movement in the direction of that tilting. Because this occurs over 360 degrees, the top remains centered within the field. If the top spins too fast, rotation is excessively smooth and the degree of wobble (and thus tilting and magnetic resistance to sideward movement) is inadequate; the top will exit the levitation field. If spinning is too slow, the rate at which tilting occurs will also be too slow and the top will either exit the field or simply flip over. While there are certain principles involved that have not been touched on, and the precision of the language could withstand a bit of refining, I think that what has been discussed should provide sound footing and a satisfying degree of understanding.
Respectfully,
JC