The intestinal tract is a long tube your food passes through from end of your stomach to your anus. As your food is passing through the first part of the intestinal tract, called the small intestine, it is broken down by digestive enzymes. The part that cannot be broken down is passed on to the next part of the intestinal tract called the large intestines and then expelled through the anus.
The small intestines is primarily responsible for continuing to break down your food to smaller pieces than the stomach did. The large intestines is primarily responsible for reabsorbing the water that your stomach added to your food. The anus keeps everything from coming out until it is convenient for it to do so.