When an astronomical object has a magnetic field and an atmosphere, it is commonplace for ions to form a plasma that is trapped in the magnetic field. The plasma conducts electric current. Therefore, when it tries to flow through the magnetic field, eddy currents form and resist the motion.
Because of the magnetic trap, the combination of magnetic field and plasma behave very like a fluid dripping from springy lines in the shape of a hairy sphere. This combination of magnetic field and plasma is called the magnetosphere.
The ions are usually formed as sunlight, especially ultraviolet, hits the upper atmosphere. As planets get farther from the sun, their magnetospheres therefore become less dense, and less active. Objects that lack a magnetic field, such as the moon, lack a magnetosphere. Objects that lack atmosphere also lack one.
The inner edge of the magnetosphere is most often called the ionosphere. It is used to reflect radio waves.