The 'antigravity' force that repels the top from the base is magnetism. Both the top and the heavy slab inside the base box are magnetized, but oppositely. There are four magnetic forces on the top: on its north pole, repulsion from the base's north and attraction from the base's south, and on its south pole, attraction from the base's north and repulsion from the base's south. Because of the way the forces depend on distance, the north-north repulsion dominates, and the top is magnetically repelled. It hangs where this upward repulsion balances the downward force of gravity, that is, at the point of equilibrium where the total force is zero.

To prevent the top from overturning as well as providing a force on the top as a whole, the magnetic field of the base gives a torque tending to turn its axis of spin. If the top were not spinning, this magnetic torque would turn it over. Then its south pole would point down and the force from the base would be attractive and the top would fall.