Some kids simply are not ready to potty train as early as other kids are and boys often take longer to potty train than girls do.
If you wait until the child is 3 or at least close to 3 years old the kid will often potty train much faster than they would if you had started potty trained at 2 or younger.
For a child to actually potty train, they need to be able to recognize when they need to go, pull up and down their pants and make it to the toilet successfully.
If the child or toddler still has to be taken to the toilet and is wetting or pooping their pants constantly or very often, then they really are not ready.
Once a child is ready to potty train, then they should potty train within 3 days to a few weeks or a month at most with very little accidents.
My kids potty trained around 3 and 3 and 1/2 and one of my kids didn't potty train until he was 5 and I never forced the issue.