So I was learning about the LC circuit and I know that an inductor would oppose the change in current through it, so if I connect a charged capacitor with an inductor, the charges on the capacitor would want to flow to the other side and neutralize the two plates like it does when the two plates are connected by a regular wire. But why in an inductor do the charges flow all the way through the inductor to charge the other plate with opposite polarity ? I mean if the capacitor is completely discharged then everyone is happy , why in the world would the charges flow again to the other plate ?
At the moment when the capacitor is completely discharged, the voltage across it is zero, that's true. However, at that moment there is a current through the inductor. It produces a voltage (emf) across the inductor that continues to drive electrons around the circuit, pulling electrons from one plate of the capacitor and depositing them on the other plate. The capacitor starts to charge up again, with the opposite polarity as before.
It's the same basic reason that a pendulum keeps swinging and doesn't just fall to its lowest level and stay there. The system started with some potential energy and, if it's isolated, the energy is still there, in the system in a combination of Potential and Kinetic energy. The reason for the 'reversal' on the way through the cycle is described by Lenz's law. As the current in the inductor starts to reduce, a voltage is induced (across the L and C) which 'opposes' the reduction - that involves a voltage across the capacitor which is in the opposite sense to what it started with so it charges up the other way. And so on.
To continue with this analogy, a real pendulum does eventually come to a stop at the bottom of its path because of friction. The amplitude of the swings decreases gradually from one swing to the next until it reaches zero. Similarly, a real circuit always has some resistance (RLC circuit), which causes the amplitude of the "swings" of the oscillating current to decrease gradually until it reaches zero.
But if you apply a constant electricity source to the LC circuit it continues to swing right just like when you push the pendulum with hand or whatever instrument. ? Another way to keep the LC going forever would be to make the circuit at a superconducting state right?
You would need to define what you mean by "a constant electricity source" if you want a considered reply. But I could point out that. even with superconductivity, whatever the dimensions of the circuit, energy would be lost through electromagnetic radiation so the energy would gradually become dissipated.
Well that's what I thought about the electromagnetic radiation, also a constant electricity source n this case was meant like a mains voltage stepped down via transformer /rectified /filtered and fed into the LC. Is that good enough?
Do you mean an applied DC voltage, then? Is the source impedance zero (applied across the LC in parallel or the LC in series? It makes a vast difference because if the are in parallel, the volts across the circuit are constant. Details are very important when you are trying to describe an 'ideal' case. Electrical problems are not easily solved just by waving arms - sorry to sound grumpy but it is true. The only circuit which has a meaningful answer is for a series LC, in which case there is a step function of applied (DC) volts, which will produce an oscillating voltage at the junction of L and C which will be offset from Earth equal to the applied voltage. As the Q of the circuit will be very high (limited only by the radiation resistance), the voltage oscillation could be very high at the resonant frequency.