The external anal sphincter keeps the exit closed throughout the day. If you've ever made a conscious effort to close the flood gates during a bout of diarrhea, the external anal sphincter is the muscle you were controlling.
The internal anal sphincter is an involuntary muscle, which means it does its job on its own without any orders from you. What is its job? The internal anal sphincter helps keep poop from leaving the body before its time and also helps escort it out when the time is right.