
When current passes through a conductor, a magnetic field is created around it. When wire is wound into a coil, it produces a much stronger magnetic field.
By turning current to the coil on and off, this magnetic effect can be turned into mechanical movement, pulling a switch open or closed. This is the principle behind electrical relays. Coils of wire can be mounted on a shaft and placed in a magnetic field. Sending current through the coils draws them across the field, and if the current is accurately switched, this is constantly repeated to produce the rotary motion of the electric motor.
n physics, a magnetic field is an entity produced by moving electric charges (electric currents) that exerts a force on other moving charges. (The quantum-mechanical spin of a particle produces magnetic fields and is acted on by them as though it were a current; this accounts for the fields produced by "permanent" ferromagnets.) A magnetic field is a vector field: it associates with every point in space a vector that may vary in time. The direction of the field is the equilibrium direction of a compass needle placed in the field.
Changing magnetic fields, according to Faraday's law of induction, can induce an electric field and thus an electric current; similar currents can be induced by conductors moving in a fixed magnetic fields. These phenomena are the basis for many electric generators and electric motors.
Magnetism
In physics, magnetism is one of the phenomena by which materials exert an attractive or repulsive force on other materials. Some well known materials that exhibit easily detectable magnetic properties are iron, some steels, and the mineral lodestone; however, all materials are influenced to one degree or another by the presence of a magnetic field, although in most cases the influence is too small to detect without special equipment.
Magnetic forces are fundamental forces that arise due to the movement of electrical charge. Maxwell's equations describe the origin and behavior of the fields that govern these forces (see also the Biot-Savart law). Thus, magnetism is seen whenever electrically charged particles are in motion. This can arise either from movement of electrons in an electric current, resulting in "electromagnetism", or from the quantum-mechanical orbital motion (there is no orbital motion of electrons around the nucleus like planets around the sun, but there is an "effective electron velocity") and spin of electrons, resulting in what are known as "permanent magnets".
Magnetic dipoles
Normally, magnetic fields are seen as dipoles, having a "South pole" and a "North pole"; terms dating back to the use of magnets as compasses, interacting with the Earth's magnetic field to indicate North and South on the globe.
A magnetic field contains energy, and physical systems stabilize into the configuration with the lowest energy. Therefore, when placed in a magnetic field, a magnetic dipole tends to align itself in opposed polarity to that field, thereby canceling the net field strength as much as possible and lowering the energy stored in that field to a minimum. For instance, two identical bar magnets normally line up North to South resulting in no net magnetic field, and resist any attempts to reorient them to point in the same direction. The energy required to reorient them in that configuration is then stored in the resulting magnetic field, which is double the strength of the field of each individual magnet. (This is, of course, why a magnet used as a compass interacts with the Earth's magnetic field to indicate North and South).
Magnetic field lines
Technically, the magnetic field isn't a vector according to the formal definition, it is a pseudovector: it gains an extra sign flip under improper rotations of the coordinate system. (The distinction is important when using symmetry to analyze magnetic-field problems.) This is a consequence of the fact that B is related to two true vectors by a cross product (e.g. in the Lorentz force law). To simplify the study of magnets an arbitrary(but valid) description of magnetic field lines was created. 1 magnetic field line = 1 gauss line. 10,000 gauss lines per square meter is equal to 1 tesla. The total number of lines emanating from a magnet pole is the magnetic flux. Count only north or only south pole lines, i.e. monopole or one sided value.
Although the field line orientation is typically indicated in diagrams with an arrow, the arrow should not be interpreted to indicate any actual movement or flow of the field line.
Rotating magnetic fields
A rotating magnetic field is a magnetic field which rotates in polarity at non-relativistic speeds. This is a key principle to the operation of alternating-current motor. A permanent magnet in such a field will rotate so as to maintain its alignment with the external field. This effect is utilised in alternating current electric motors. A good rotating magnetic field can be constructed using three phase alternating currents (or even with higher order polyphase systems). Synchronous motors and induction motors use a stator's rotating magnetic fields to turn rotors.
Source: CDX Global & Wikipedia - en.wikipedia.org