compasses use the magnetic attraction of north to show which direction you are going, putting one near a magnet will mess with the magnetic attraction it has to north making it go the wrong direction
5.1m questions
6.7m answers