Using pair trading can we do hedging, if yes how to do it?

Not really. The idea behind hedging is to eliminate systematic risk, however when you initiate a pair trade you only deal with unsystematic risk. For this reason pair trading cannot be considered as a hedge. In fact as a follow up to this question, I will shortly post a link from Varsity which will talk all about hedging.