Ever wondered exactly what your sheep or goat looks like under that wool or hair? The Online Veterinary Anatomy Museum has some great labeled images.
Sheep and goats are classified as ruminants. Ruminants digest forages and fiber by microbial fermentation before it reaches their "true stomach". This enables them to utilize feeds that would otherwise not be digestible. They have a four compartment stomach, made up of a Reticulum, Rumen, Omasum, and Abomasum.
Feed initially enters the reticulum from the esophagus. The reticulum is lined with honeycomb like projections that let any heavy materials consumed (rocks, metal, etc) fall into the lining while the feed moves sorted by particle size into the rumen. The rumen is a huge fermentation vat. It is filled with fluid and feed, with a fiber mat floating on the top. This allows anaerobic bacteria to flourish below the fiber mat and breakdown feeds (hay, grass, fiber) into volatile fatty acids. Most volatile fatty acids are absorbed through the rumen and the remaining . From the rumen, fluid, bacterial protein, and small particle size feeds move into the omasum. The omasum is lined with "leaves" which allow it to trap particles and squeeze them to absorb as much fluid as possible. Semi digested feed particles are then moved into the abomasum. The abomasum acts as the "true stomach" and uses chemical and enzymatic digestion to break down feed particles for absorption. From the abomasum digested feed moves into the small and large intestines.