When electricity flows through a wire, it creates a magnetic field around that wire.