How does a compass work?
A special magnet
A compass is a magnetic metalized needle mounted in such a way that it can spin freely. Compass uses the principle of ‘Like poles repel and unlike poles attract’.