This is because when those materials are cooled to extremely low conditions, they are able to manipulate the magnetic fields of magnets, and conduct them with almost no resistence.
The magnets simply float in place because of something called flux pinning where the superconductors leaves thin threads of magnetic field to hold the magnet floating above it in place. This is due to defects and inpurities in the superconductor. However, the magnet can be moved by force and spun around freely if the superconductor is big and strong enough.
However, the moment it gets too warm, the material loses its superconducting ability almost instantly.
I hope this helped!
~~~Harsha~~~