Cows are so called ruminants which means they can digest long fibrous materials such as grass and legumes by fermenting them in their multi compartment stomach. Think of a giant, four legged sauerkraut crock.
Now when a cow eats, she just chews her feed long enough to moisten it and be able to swallow. The feed then passes into the first stomach chamber where bacteria start to soften it. This is what's called the cud. The cud is then regurgitated by the cow and chewed a second time before going back into her stomach for final digestion in the other stomach compartments.
By this process cows are able to derive most if not all of their nutrition from grass and other fibrous materials. Something omnivores, like us, have a much harder time accomplishing.