I have a question about the working of an inductor..
The opposition to change in current is observed because the inductor is extracting power from the current and storing it as energy in the magnetic field.

So, if the current is increasing, the magnetic field will build up (which takes energy). This energy must come from the current and is extracted by causing a positive voltage across the inductor.