Foals are born with immature immune systems and rely on a good supply of preformed antibodies found in the colostrum, the "first milk" of their dams. For the first 24 hours after birth, the milk is very high in antibodies (immunoglobins), and the newborn foal's intestinal tract is able to absorb these whole during that time. If the foal doesn't receive the colostrum during this time, the window of opportunity for absorption is lost and the foal is at very high risk for infections and even death.
Because of this, it's important to observe the newborn foal closely and contact your vet immediately if the foal hasn't nursed within an hour or two of birth, or if he isn't nursing frequently. Your vet can then pass a stomach tube and administer colostrum from the mare, frozen colostrum from another horse or a commercially available colostrum substitute/serum product.
If the foal is weak but will suck from a bottle, the vet will likely instruct you to give another dose of either milk obtained from the mare or a substitute. It's possible to order colostrum-replacer products, such as Seramune, from some equine supply houses, but they are a poor substitute for the mare's actual milk since her body will have produced antibodies specifically against the range of bacteria, viruses, fungi and other pathogens that are common in your environment, as well as antibodies in response to vaccines she has received. The next best choice is colostrum that was taken from another mare, and finally the commercial products.
Because you only have a short period of time to get the antibodies into the foal, it's wise to be prepared by letting your vet know that your mare will be foaling soon and asking if they keep a supply of colostrum or colostrum replacer on hand. If not, they can take steps to locate a source that would be available to them within hours. You could order it yourself, "just in case," but these products are expensive and if you do have a foal that isn't nursing well, odds are it has a problem and you need to involve your vet right away.