Magnetic helicity is proportional to the sum of the topological quantities twist and writhe for magnetic field lines. The twist is the rotation of the flux tube around its axis, and writhe is the rotation of the flux tube axis itself. Topological transformations can change twist and writhe numbers, but conserve their sum. As magnetic flux tubes (collections of closed magnetic field line loops) tend to resist crossing each other in magnetohydrodynamic fluids, magnetic helicity is very well-conserved.