An inductor is an electrical component that stores energy in a magnetic field when an electric current flows through it.