# electromagnetic field cosmic radiation

How does an electromagnetic field of a planet prevent cosmic rays to hit the planet? Please explain it in a simple way.

$\vec{F}=q\vec{v}\times\vec{B}$