If capacitor blocks dc then why it is actually used in the circuit?
Being able to pass AC voltages but block DC voltages is a very useful feature. Audio amplifiers are made up of individual stages of amplification, preamp stage, power amp stage, etc. It's very useful to be able to pass the ac audio signal from one stage to the next using a series 'coupling' capacitor, without upsetting or having to deal with the individual different DC bias voltages that each stage uses. A bypass cap from a DC power rail to ground allows AC noise voltages to pass to ground without shorting out the DC bus to ground.