When cooking with cheese, there's nothing much worse than choosing the wrong cheese for the wrong application. Mozzarella's not great as a finisher atop pasta in the same way that parmesan is, for example, because it becomes clumpy and stringy, while a harder cheese like parmesan can become a more cohesive element of the dish. Understanding why cheeses melt in different manners can help keep your fontina on your paninis and your fetas in your salads.
When you melt cheese, you're essentially softening the milk proteins and fats to varying degrees of pliability and usability. When a cheese is heated, the protein matrix — which trapped the fats and proteins in milk and helped form solid curd when the cheese was made — collapses, encouraging the flow of cheese into a more liquid form.
The way a cheese melts is determined by its moisture content: low-moisture, and therefore normally drier, crumbly, harder cheeses, call for higher temperatures because they have such a concentrated formation of protein bonds that are harder to break down. When they melt, they don't flow in the same way that softer, more pliable, higher-moisture cheese does, which melts at lower temperatures and whose protein bonds collapse more easily.
Furthermore, a cheese that melts more easily, like a higher-moisture cheese, will then melt more cohesively with itself, while a really hard cheese like parmesan will melt as individual shavings, but won't become a melted mass like a semi-hard gruyere or cheddar. Ever heard of a grilled cheese made with a dry, aged pecorino? Probably not.
Stringiness is largely determined by how aged a cheese is as well. A well-established colony of casein (cheese protein) molecules, aged and hardened by the activity of ripening enzymes, is less able to morph into a melted, stringy form. High moisture helps to separate casein molecules, so stringier, more meltable cheeses will often be higher in moisture, but not so high like a mozzarella, that they stick together.
The best melters in the world are a great combination of both age and moisture: Emmenthaler, Gruyere, and Comte, the legendary mountain cheeses and the originators of fondue: the ultimate showcase of how choosing the right cheese for the right application pays off.
Thanks to On Food and Cooking, by Harold McGee, for reference.
Related: In Praise of American Cheese
(Image: Flickr member cooknken licensed for use under Creative Commons)
Elizabeth Apron fro...

I like cheese and I often find myself using the wrong cheese for the wrong dish. Thanks a lot.
Now all I can think about is melted cheese, in some manifestation, for lunch.
wondering about the reason why cheese gets the creamiest when you add it to hot milk... makes sense-- but is it because the milk adds moisture to the cheese?
So what is fontina? (ignoramous here)
what's wrong with mozzarella on top of pasta!!? that's the best, and so much tastier than parm.
Hey, this is a great piece!
Harold McGee's "On Food and Cooking" has some good tidbits about the science of cheese, too. One thing I learned from him that I've found very useful is to use an acid (white wine, lemon juice, etc.) to help unwind the cheese proteins for smoother melting. Very helpful when you've got a fondue or cheese sauce that uncooperative.
I just wanted to say THANK YOU! I have been reading your blog for over a year now, but have never really said much until now....I was working on a lab report for my food science class and even my book had not been helping me. I googled for help and lo and behold you had the perfect answer! I had always sort of "known" why but couldn't put it as nice as you! Thank you so much for this post! :-D