When electrons, or any charged particles, flow in the same direction (for example, as an electric current in an electrical conductor, such as a metal wire) they generate a cylindrical magnetic field that wraps round the conductor (as discovered by Hans Christian Ørsted).