2 tablespoons butter
2 tablespoons flour
2 cups whole milk (or cream or half and half, I've never tried it with less than whole milk)
2 cups cheese
salt and pepper to taste
Melt butter in a saucepan over medium heat. Whisk in flour and continue cooking until mixture is lightly golden. Whisk in milk and bring to a boil. Once it starts to thicken turn heat to low and add cheese, salt, and pepper. Once the cheese is melted it's done!
This is the basic recipe I use whenever I need a creamy cheese sauce. Minor variations make cheesy potatoes with ham, or pasta alfredo. You can saute garlic and/or onions in the butter. You can increase or decrease the cheese to your taste. You can mix different kinds of cheese. You can serve as-is over pasta straight from the stovetop, or you can mix it into a casserole and bake.