Prem Kumar
2

For magnetic compasses, the needle is a magnet. So, yes, if heated to a sufficiently high temperature it will lose its magnetisation. Any magnet is made of tiny atomic or molecular "dipoles" which are all pointing in the same direction.. When heated, the atoms jiggle around more and more until at the Curie temperature, the magnet undergoes a "phase transition" to a demagnetised phase when the tiny atomic dipoles point randomly in different directions and that is the thermodynamically favoured state.For iron this temperature is around 1000 Kelvins or more, so this is unlikely to be a problem unless the compass were hurled into a furnace or a volcano (!!). Most compasses are built within sealed containers that insulate against strong temperature fluctuations, so this should not be a problem in practice. (Compass needles have been known to lose their magnetisation or reverse their polarity when placed near devices that have strong magnets inside them.)