I'll try to do a simplified explanation from a voice therapist standpoint. If you look down your throat, your vocal folds form kind of a "V". When you cough or clear your throat, that "V" slams shut. As you slam it together continuously it gets raw and inflamed or irritated. Then when the cords come together to make voice sounds the closure is "imperfect" and some air escapes and causes that hoarse sound or you can't make a voice at all because you are not getting good closure.
BTW....this happens to me a couple of times every winter, ughh!! I am just now getting my voice back. Some things that help are keeping hydrated so your vocal folds are hydrated. Staying away from caffeine. NOT whispering when your voice is not working....whispering strains your voice more. Not yelling<img src="i/expressions/face-icon-small-smile.gif" border="0"> I try to calm my cough down when it is NOT productive. I think that dry hacky cough is what kills my voice. So I drink ice water or cool my throat down to stop that non-productive cough and I try to huff cough instead. I even opened the door to get some cool air in my lungs this morning to stop the dry cough....I don't suggest that for everyone; but, the cool air worked for me. Just anything you can do to stop the dry coughing so you can get to the productive huff cough that actually brings stuff up.