How does inductor store energy in the magnetic field? I learnt from book that magnetic field does no work  because the force is proportional to $\vec{v}\times\vec{B}$  where $\vec{v}$ is the particle velocity. That vector cross product is always at right angles to $\vec{v}$, so that $\vec{F}\cdot\vec{v}=0$, i.e. no work is done on the particle. But then how come does an inductor store energy in the magnetic field?
 A: From a circuit theory perspective, recall that the product of voltage and current is power:
$p(t) = v(t) \cdot i(t)$
Also, for the inductor:
$v_L(t) = L \dfrac{d}{dt}i_L(t)$
So, there is only a voltage across an inductor when the inductor current is changing with time.
It follows that power (time rate of change of work) is supplied to or delivered from the inductor when the inductor current is changing with time.
But, the magnetic field threading the inductor must be changing with time if the inductor current is changing with time.
Finally, recall that a changing magnetic field induces a non-conservative electric field which can do work.
Remember, for a constant current through an (ideal) inductor, there is no associated power as there is only a steady magnetic field and thus no induced electric field.
A: I think you're relating an Inductor coil with Magnetic Lorentz force.
Specifically, Lorentz force is experienced by a charged particle moving in an uniform magnetic field. $F=q(\vec{v}\times\vec{B})$. Let's see Inductor first...
Please keep in mind that an Inductor always has a self-inductance $L$ and some resistance $R$ (of the material it's made of - except for an ideal one..!) associated with it. Hence, Some work has to be done by external agencies in establishing current. This work done is stored as electromagnetic potential energy in an inductor.
Induced emf, $e=-L\frac{dI}{dt}$ (negative sign indicates the opposing nature, consequence of Lenz law)
The small amount of work done over a small time $dt$ is $$dw=e.I.dt$$ $$\implies dw=-LI.dI$$
(Power $P=VI$ is used here, because Power is the rate of doing work as we know...)
Thus, the total work done is establishing a steady current (say $I_o$) is $$W=-L\int_0^{I_0}I.dI=-\frac{1}2LI_o^2$$ 
Negative sign shows the opposing nature of the emf (same consequence of Lenz law). The small time $dt$ is taken into account because - Whenever you pass current through an inductor, steady current would be established only after some period of time. The current would be established in an increasing order. When the power supply is provided, the induced emf opposes the growth of current and when the power supply is cut-off, the emf now opposes the decay of current. (i.e. It goes in a decreasing order)
Hence, the work done by these agencies is referred to as the energy stored in an inductor.
A: in inductor if we passed the alternating current it produced the magnetic field.this magnetic field is chaneg with the current.the change in magnetic field produced the induced emf(according to faraday low).this induced emf oppose the main source which caused it(according to lenz law).this emf now has the ability to flow the electron so we called it the energy
A: It's an electric field moving that particle inside of an inductor and it does the work.
