A magnetic stirrer consists of a rotating magnet or a set of stationary electromagnets, which create a rotating magnetic field. A stir bar, typically coated with PTFE to resist chemical reactions, is placed inside the container of liquid. When the stirrer is activated, the magnetic field causes the stir bar to rotate, facilitating thorough mixing.