All babies will potty train at different ages but you can and should at least try to potty train your baby once they turn 18 months of age.
At 18 months of age most babies are ready to begin potty training but some may not be quite ready until closer to age 3 or until the child is age 3.
After age 3 and especially at 4 years of age the child should be forced to potty train since the child will not be able to go to Kindergarten in diapers.
A child should definitely be out of diapers by age 4 but any younger than 4 it's okay for a child to still be in diapers.