A large portion of the discussion of stirred and baked custard hinges on eggs. Eggs serve as the glue, holding the custard together through coagulating or solidifying when heated. Milk contributes to the thickness of the custard, as those made with water will not gel or thicken. Sugar is also important as the addition of it in a recipe results in a softer custard. Salt and flavorings affect taste.
Heat is an important factor when making a custard.
Slow cooking can be achieved by placing the custard mixture in a waterbath in the oven to bake or by using a double boiler with a stirred custard. The important thing to remember is to remove the custard from either the minute it's done. A custard heated at too rapidly or too hot heats the mixture before thickening begins and results in syneresis or weeping or little tunnels with water. With a stirred custard, it is a good idea to strain it after cooking. With cheesecakes , there are other tests for doneness.