There are a couple of factors that contribute to the creamy texture of a good macaroni and cheese (see** Elbow Room**). You need a smooth bechamel or egg custard as a base, for one thing, and you need to make sure your cheese melts evenly and becomes one with the sauce and the noodles. Some cheeses are better suited to the task than others. Firm cheeses like cheddar, Comte, fontina, and Gruyere are famously good, uniform melters. In small amounts, hard cheeses like Parmesan and Pecorino Romano work well, too. Mozzarella and goat cheese do not: the former becomes stringy, and the latter will hardly melt at all, ending up instead as sticky clumps. Why? The proteins in those cheeses break down less readily when heated, and so they’ll stick together rather than disperse in the sauce. Whichever kinds of cheese you’re using, let them come to room temperature before you begin cooking, and grate them as finely as possible; doing so increases the surface area that’s exposed to the heat, making for more uniform melting. Also, heat the cheese gently with the sauce; a blast of high heat can cause proteins to break away from the fats, resulting in a grainy texture.
A handful of cheeses are especially well suited for making macaroni and cheese.