How does cough medicine work?

Every kind of over-the-counter cough medicine has the same active ingredient: Dextromethorphan HBr (5-15 mg/dose). Why do people cough when they get a cold, and what does this drug do to stop it?

There is some question as to how effective OTC cough medicines really are:

http://content.health.msn.com/content/article/18/1689_51929.htm

Although, there is always the placebo effect, which should never be underestimated.