Magnetic field
A magnetic field is a vector field that describes the magnetic influence of electrical currents and magnetized materials. In everyday life, the effects of magnetic fields are often seen in permanent magnets, which pull on magnetic materials (such as iron) and attract or repel other magnets. Magnetic fields surround and are created by magnetized material and by moving electric charges (electric currents) such as those used in electromagnets. Magnetic fields exert forces on nearby moving electrical charges and torques on nearby magnets. In addition, a magnetic field that varies with location exerts a force on magnetic materials. Both the strength and direction of a magnetic field varies with location. As such, it is an example of a vector field.
Stellar magnetic field
A star with a magnetic field will generate a magnetosphere that extends outward into the surrounding space. Field lines from this field originate at one magnetic pole on the star then end at the other pole, forming a closed loop. The magnetosphere contains charged particles that are trapped from the stellar wind, which then move along these field lines. As the star rotates, the magnetosphere rotates with it, dragging along the charged particles.