A cow has four stomachs (or four stomach chambers to be exact) each playing an important part to digest food.
The rumen is very large and can hold up to 150-200 liters of partly digested food. It is full of bacteria and softens the food. The bacteria then ferment the carbohydrates in the food allowing the cow to produce energy. In doing so gas is produced (about 500-1500 liters a day), of which approximately 30 percent of this is methane gas and is expelled during belching. This is also how the foodstuff is passed from one chamber to the next.
The reticululum softens the food even further and forms it into small lumps of cud.
The omasum processes the cud further breaking it up and filtering it.
The abomasum works similar to the human stomach. The food is digested by the stomach juices and the useful nutrients are absorbed by the blood.