Preheat the oven to 375°F. Lightly grease a baking dish.
Cook the macaroni according to the package directions. Drain and set aside.
Melt the butter in a saucepan over medium heat. Stir in the flour and cook for about 1 minute.
Slowly whisk in the milk. Cook for 3–5 minutes, stirring, until the sauce begins to thicken.
Reduce the heat and stir in the cheddar cheese until melted. Add salt and pepper.
Mix the cooked macaroni into the cheese sauce.
Transfer the mixture to the baking dish. Sprinkle breadcrumbs on top if desired.
Bake for 15–20 minutes, until hot and lightly golden. Let it rest for a few minutes before serving.