Depends on the cheddar.
Mild cheddars are easier to work with than medium or aged cheddars. The latter tend to separate into oil and stringy bits that dont dissolve. You have to instead, crumble the cheese and mix with cold milk, stir to crumble further, add a tiny amount of starch, then whisk and while putting under the most gentle of heat. (otherwise it will separate, and do bad nasty things. By gentlest of heat, I mean barely warming it at all, almost like a reduction sauce. You want the starch to start setting before the cheese even tries to melt, or the milk even thinks about scalding.)
The alternative, is to add the starch to the milk, set it, (heat the milk to just scaled, mix the starch into cold milk, then whisk the two together in the pan quickly. If using flour, you need to create a roux with fat to remove the raw flour taste. Heat the flour with the fat, then remove from heat, and whisk in warmed but not hot milk. Stir viggorously until combined, then return to heat to set.) THEN stir in the cheese after taking off the heat. Hard cheeses tend to not want to melt that way though.
In all cases, avoid overcooking. Heat until set, but no further.
(Creating a sauce the old fashioned way requires you to know how to deal with the differences between flour and starch, how to make a roux if applicable, et al. Compared to instant mac and cheese, where it is aimed at people that can burn water.)