Hi
I think I know the trick you are referring to. The magnet will flip over unless it is, itself, spinning (like a gyroscope) - which you will have discovered for yourself; spinning the base has no effect at all. There is a theorem that tells us you can't have a stable system of magnetic levitation with simple magnetic materials (ferromagnetic) but there are arrangements of magnets which include Diamagnetic Materials and these are stable.
Using a superconductor, you can achieve stable levitation - as long as you keep the superconductor cold enough!
Do a bit of googling using some of the above terms and you will find some good pictures and movies.