Details
The compass needle points towards the player's original spawn point, whether in your inventory screen, in chests, lying on the floor, or while holding it in your hand.
If brought into or crafted in The Nether or The End, the compass' needle will spin wildly and point in random directions, making it useless for navigation.