Lumps usually form in a sauce when you add too much flour or cornstarch at once. Instead of adding a spoonful of flour to the sauce, rather melt two tablespoons of butter per cup of sauce and then add two tablespoons of flour bit by bit – stirring continuously. When smooth, stir this mixture into your sauce bit by bit and cook on medium heat until it thickens.
You can also dissolve flour/cornstarch in a little milk before adding it to the sauce . But be careful when adding cold liquids to hot sauces – the trick here is to remove the saucepan from the stove and add the liquid slowly in order to prevent lumps.
If you do happen to make a lumpy sauce and need to rescue it, invest in a very fine sieve and pour the liquid through it to remove the lumps.