Hi!
Guinea pigs need to digest the grass/hay fibre that is the mainstay of their diet (over 80%) twice to get the full benefit. They do this by making special poos (called caecotrophs) after the first run which contain the yet not fully digested fibre for the second run.
Piggies generally pick any caecotrophs up straight from the genitalia; that is why you rarely see any of them lying around. Caecotrophs have a different colour/texture and smell to the normal waste poos and are produced at a different time.
Waste poos are produced and discarded from both runs through the gut.
I hope that that answers your question?
You can find lots more interesting information about guinea pigs in this link here:
Guinea Pig Facts - An Overview