The World Health Organization (WHO) recommends exclusive breastfeeding for at least the first 6 months, and the overall presence of maternal milk in a child's diet should last at least 2 years.
If breastfeeding ends early, the child is switched to formula. Ideally, the child transitions almost entirely to "adult" food by age one. Milk/formula ceases to be the central part of the diet, and the child receives nutrients from regular foods. Typically, the formula is not necessary for children over one-year-old. Still, if there are specific circumstances (such as acute or chronic illness, feeding difficulties, insufficient weight gain, behavioral issues, etc.), it may be recommended.