what is it?

When an electrical current flows through a wire, a force called electromagnetism is produced. As with a conventional magnet, two poles are created, which are determined by the direction of the current.

This force is relatively weak but we can strengthen it in a couple of ways. One is to use a coil instead of a straight wire. The other is to wrap the coil around a magnetic material. Using a coil instead of a straight wire is the principle of the inductor. Using a coil wrapped around a magnetic material is the principle of a transformer.