Cows have four stomachs, to break down and digest the grass into little pieces. The half digested grass gets burped back up and the cows have to chew it again for 1 minute.Some of the grass gets made into milk and some of the grass gets pooped out.
Milking happens twice a day, early in the morning and late at night. They can never be missed out or they can have an infection.
Now days milking machines do all the hard work, so it is an easy job for the farmer. Do you know 1 cow can give 30 liters of milk. It takes 7 to 8 minutes to milk each cow.
here is a image from cows stomachs