|MadSci Network: Astronomy|
The best description of this is from a book called A Man on the Moon: The Voyages of the Apollo Astronauts by Andrew Chaikin. You should definitely read it if you're interested in the Apollo missions. Here is an excerpt from Chapter 3, "First Around the Moon":
But one aspect of weightlessness was so unpleasant was so unpleasant that even the thrill of exploration didn't make up for it. If this marvel of engineering called Apollo had one major design flaw, it was the 'Waste Management System,' perhaps the most euphemistic use of English ever recorded. For urine collection there was a hose with a condom-like fitting at one end which led, by way of a valve, to a vent on the side of the spacecraft. On paper at least, it seemed like a reasonable, if low-tech, way to handle urinating in zero g, assuming you got over your anxiety about connecting yor private parts to the vacuum of space. You roll on the condom, open the valve, and it all goes into the void where it freezes into droplets of ice that are iridescent in the sunlight. One astronaut answered the question "What's the most beautiful sight you ever saw in space?" with "Urine dump at sunset."
In reality, using the urine collector didn't work so well. For one thing, it could be painful. If you opened the valve too soon, some part of the mechanism was liable to poke into the end of your penis, which prevented you from urinating. And at that point, as if to confirm your worst fears, the suction began to pull you in. Now you were being jabbed and pulled at the same time, so you shut the valve, and as the mechanism resealed itself it caught a little piece of you in it. It took only one episode like that to convince you to never let it happen again. Next time you had a strategy: start flowing a split-second before you turn on the valve. But once you began to urinate the condom popped off and out came a flurry of little golden droplets at play in the wonderland, floating around and making your misfortune everybody's misfortune! And in no time at all the whole device reeked; it was an affront to the senses just sitting there.
The astronauts got used to the urine collector, though, and they got used to mopping up afterwards. But there was no getting used to the other part of the Waste Management System. Tucked away in a strange locker was a supply of special plastic bags, each of which resembled a top hat with an adhesive coating on the brim. Each bag had a finger-shaped pocket built into the side of it. When the call came you had to flypaper this thing to your rear end, and then you were supposed to reach in there through the pocket with your finger---after all, nothing falls in zero gravity---and suddenly you were wishing you had never left home. And after you had it in the bag, so to speak, you had one last delightful task: break open a capsule of blue germicide, seal it up in the bag, and knead the contents to make sure they were fully mixed! At best, the operation was an ordeal. In the confined space of the Apollo command module, your crewmates suffered, too. One of the Apollo 7 astronauts said the smell was so bad it woke him out of a deep sleep. When the crew came back they wrote a memo about it: "Get naked, allow an hour, have plenty of tissues handy."
I think things are better now! This web page describes the Space Shuttle toilet.
Try the links in the MadSci Library for more information on Astronomy.