Mother dogs stimulate their young puppies' excretory systems by licking their privates, stimulating them to pee and poop. Under normal circumstances, you don't have to intervene. If something happens to the mother, though, stimulating the pups' poopers becomes your responsibility.
Maternal Excretory Stimulation
A newborn puppy might have a mucus plug in his anus, which means he can't defecate. The mother dog would lick that plug away. After a young puppy nurses, the mother licks his anus and genital areas to stimulate defecation and urination. She continues doing that until he goes on his own, usually about the age of 3 weeks.
If mama dog can't feed or stimulate her puppies, you have a big job ahead of you. Ask your vet about removing the mucus plug if the puppy is a newborn. When you finish feeding a puppy, take a soft cloth or gauze pad dipped in warm water and gently rub his genitals, anal area, back legs and stomach to stimulate his excretory system. You might have to do this for as long as three weeks before he'll pee and poop on his own. If you don't stimulate him sufficiently, he'll become constipated.
Mother dogs should provide all of their puppies' needs for their first month of life. However, if the mother dog dies or can't produce milk, or you find an orphan puppy, that's another story. Ask your vet puppy milk replacement formula recommendations. Feed newborns with an eyedropper or syringe. You can switch to a bottle as they get older. Mix a puppy milk replacement formula according to directions, making up only enough for one day's feeding at a time. Puppies need fresh daily formula. The Koret Shelter Medicine Program website advises feeding puppies individually, on a raised surface, so they nurse with all four feet on that surface with their heads level. You can also feed the puppy in an upright position; just don't cradle him like a baby and allow him to nurse on his back. He could aspirate milk into his lungs. After he eats, burp him by holding him on your shoulder and gently rubbing his back until he belches. Then you can start the excretory stimulation.
By the time puppies turn 4 weeks old, you can start adding solid food designed especially for them. By that time, they should be pros at going to the bathroom without stimulation. If a puppy still requires stimulation to excrete after the age of 3 weeks, either by the mother or a person, take him to the vet for an examination. By 6 weeks of age, they're probably fully weaned from their mother or from puppy milk replacer if they were orphaned. You can send your puppies to their new homes after the age of 8 weeks.