Where does the energy stored in inductor go on opening the switch? Suppose we have a simple RL circuit. At $t=0$, I close the switch so that current starts flowing in the circuit. When the steady state is achieved, current $i=\frac{\epsilon}{R}$ would be flowing in the circuit due to which an energy $\frac{Li^2}{2}$ will be stored in the magnetic field lines on inductor. But as soon as the switch is opened, the current would become $0$, which make the magnetic field lines disappear suddenly, which according to Faraday's law must induce an emf. But as the circuit is open no current will flow in it (according to my teacher, charge can never accumulate in a circuit. So if current flows in open circuit, it would mean that charge is accumulating in it). If there is no current how can the energy in magnetic field lines disappear suddenly? Isn't this a voilation of law of conservation of energy?
Ps: I read the answer given in a similar question Where the energy stored in magnetic field goes? but I kinda disagree with the point that in superconducting coil, current will keep flowing because according to Prof. Walter Lewin, no electric field can exist inside a superconducting coil, so current cannot exist in the coil. Only surface currents must exist.
 A: TL; DR: Every real circuit has a capacitance, hence decaying RLC oscillations.
General points
There are two general points to learn from this question:

*

*Every model in physics (and beyond) has its limits of applicability. When a model is used outside of these limits, it fails.

*Model needs to correctly reflect the reality.

What's happening here?
Here we deal with a lumped circuit description, which is the most elementary way of describing electromagnetic phenomena and often fails, when we start asking of the processes that actually happen in tge circuit.
Indeed, the electrodynamics tells us that the current in the coil cannot stop instantly, and the magnetic field won't vanish instantly. And our everyday with a computer power supply, the light on which turns off a few instants after it is disconnected, is a good experimental confirmation of this. Indeed, this is a case for every power transformer, which are ubiquitous.
On the side of what is missing in the model, one could suggest non-zero conductance of the switch (as spark suggested in the other answer) or a small but finite capacitance of the whole circuit, which is missing in the model. Consider and RLC circuit with a current initially non-zero, and we will see how it gradually decays, even though the circuit is disconnected.
Remark: stray capacitances and inductances play significant role in electric power lines. Historically they were discovered when long telegraph and telephone lines were laid, particularly the transatlantic cables. This led to formulation of the Telegrapher's equations by Oliver Heaviside.
A: The inductive energy is dissipated by producing a spark at the switch terminals. The core of the spark is a thread of very hot, ionized gas which produces light and noise with some of the energy, and heat in the gas with the rest of the energy. Thus, energy is conserved.
A: If an inductor holds a certain amount of stored flux energy, and then later it has none, all of that stored energy will have to be converted to some other form of energy (likely heat) within the inductor, and/or converted to some forms of energy (which may include flux, and will almost certainly include heat) stored somewhere else.  The only way to minimize the amount of heat produced will be to convert the energy into some form other than heat (e.g. by storing it in a capacitor).
An important thing to recognize here, which I haven't noticed other answers emphasizing, is that the rate at which a switching element opens may affect how much energy gets dissipated as heat within that particular switching element, but all of the energy is going to go someplace, and the only effective way of preventing it from being dissipated someplace one doesn't want it to go is to provide someplace else it can go instead.
A: This is a situation where the simple rules are insufficient.  You simply cannot analyze that circuit any more than you can solve x+2=x+3.
What happens in the real world is that the inductor creates enough emf to form a spark in the switch.  This means the switch no longer acts like an ideal switch.
In the real world, we call this effect "flyback.". It can damage components, so we typically design circuits to prevent this from occuring.  For example, it is common to see a flyback resistor in parallel with the inductor on large motors.  It gives the current somewhere to go.
A: The current doesn't stop.
But it doesn't leave the end of the inductor either.
The reason the voltage increases at the end of the inductor is that electrons are being forced that way, due to the magnetic field, which cannot dissipate.
So the voltage at the end of the inductor rises towards infinity, as electrons compress there.
But, the inductor is not alone in the universe.
There will always be some capacitance to something, no matter how small.
The medium within that capacitance will be stressed by the increasing voltage, (unless it is a perfect vacuum)
Eventually, the electric field becomes so strong that fabric of the medium breaks down and current flows through it, from the end of the inductor. The voltage at the end of the inductor falls as the current flows and the inductor's magnetic field dissipates.
