Need to know: how to deal with complaints

Complaints are an occupational hazard in the pub trade – no matter how good you are – so what are the best ways to deal with them constructively?