anuragmash,
I don't know when to use a capacitor and an inductor in a circuit?
There is plenty of technical material on that subject. Start studying. Keep in mind that inductors and capacitors are energy storage devices. Inductors store their energy in a magnetic field, and caps store it in an electric field. Any changes to these two kinds of energies causes a change in voltage and/or current at their terminals. Your will have to study how and why these effects take place.
I do know that capacitor impedes any change in voltage and inductor impedes any change in current.
That description is confusing. It does not describe the behavior from the start to end of the transient period. Isn't it more descriptive to say that those storage elements divert some of the applied electrical energy to build their fields when source energy is available, and return energy by collapsing their fields when the source energy is unavailable?
Using this information I am again confused because in a capacitor if there is a voltage spike in the power supply the energy is stored in the plates of the capacitor and then this extra energy will get discharged thus nullifying the job done by the capacitor.
The energy is not stored in the plates of a capactior. It is stored in the electric field within the dielectric between the plates. Yes, a spike will cause an increase if electrical energy, but it can be returned back to the circuit at a different time, and in a different form other than a spike. So the spike energy is stored in the capacitor instead of being dissipated across some semiconductor junction and destroying the component.
Similiarly with inductor because any change in the current is stored in the magnetic field as voltage the job is again nullified...
Again, the inductor is storing the energy of the extreme pulses, and returning them back to the circuit at a different time in a different form. How can its job be nullified if it is doing what it is suppose to do? It takes in energy and eventually returns the same amount energy.
Also why do we use coupling capacitors in ac transistor circuits???
So that the DC component of the signal is isolated from the AC component of the signal.
Ratch