An astrophysical Dynamo is a mechanism by which a body transforms thermal and Kinetic Energy into electrical energy and through it, generates and maintains magnetic fields. It is analogous to an artificial mechanical dynamo, a type of electric generator, but rather than a mechanical commutator, electricity is carried by fluids that are moving and conduct electricity. The body must be spinning and carry a conducting fluid. The mechanism follows the rules of Magnetohydrodynamics (MHD).
The Earth's magnetic field is maintained by such a dynamo, with molten Iron (Fe) in the core being the conducting fluid. The Sun also has such a dynamo, its gaseous interior being a conductor. Other stars, planets, as well as galaxies are thought to maintain magnetic fields through the dynamo mechanism.
Interplanetary Medium (IPM)