An artist's rendition of Mars' magnetosphere.
Click on image for full size
The particles that come from the sun are called the solar wind. This wind pushes a planetary magnetic field back so it ends up looking like a big tear drop surrounding the planet.
The picture shows some of the parts of a magnetosphere.