Earth is fortunate in having a magnetic field: it protects the planet and its life from harmful cosmic radiation. Other planets in our solar system—such as Mars—are constantly bombarded by charged particles that make life difficult.