The magnetic stirrer consists of a rotating magnet or a set of stationary electromagnets placed beneath the vessel containing the mixture. A stir bar, which is coated with materials like Teflon to avoid chemical reactions, is placed within the container. When the magnetic field rotates, it causes the stir bar to spin, thus mixing the solution uniformly. The speed and duration of stirring can be controlled to achieve the desired level of homogeneity.