bhairava is the guardian deity of the abode of God shiva. So he is called kshetra pAla. The term bhairava means "Terrific". As the guardian of the abode of Lord, his form is very fierce, with ery many kind of weapons, naked and decorated with skull and having a smile on the face that threatens the wrong doers and protects the devotees. He has a dog as his vehicle. So he is referred as shuna vAhanar.
bhairava is not a form of Lord shiva, but a form very closely associated and he is one of the powers assigned by the Lord. It is the custom that the keys of the temple are submitted to bhairava after the pujas are completed for the day and again taken from him the next morning before the opening. As the guardian deity he is also worshipped after any of the festivals at the temple.
bhairava would be having an abode naturally in all the Lord shiva temples. The kAsi (vArANasi) abode is much renowned abode of bhairav, as he is the protector of that whole city - the holy land of the Lord vishvanath. Adishankara has sung a stotra in praise of kAla bhairava of kAshi.(1)
When brahma and viShNu were got into an argument who is the supreme, Lord shiva appeared as the column of fire in between them. kAla bhairava cut off the fifth head of brahma that lied in ego and he having that skull of brahma as the bowl, bhairava took the blood of mahA viShNu in that. The two got to understand their mistake and worshipped Lord shiva.
God appointed bhairava to be the protector deity. He also appointed him as the protector of the town kAshi. bhairava ensures that nobody misuses the belongings of Lord shiva and he is dreaded to punish and correct those who misuse the temple properties.
This deity who appears terrific is the protector of the devotees. His valour gives courage to good people and deterence to those who do the wrong things so that they get corrected.
1. Kala bhairavAshtakam