Earth has a magnetic field that acts like that of a giant bar magnet. This magnetic field protects the Earth and organisms from harmful particles from the sun by deflecting most of them to the magnetic poles. It also allows for navigation as compasses can detect magnetic north. Many animals like birds and sea turtles have developed the ability to detect and use the Earth's magnetic field to aid migration and return home.