In weightlessness, things like stubble and toothpaste suds don't just fall neatly into the sink. Crew members have to capture trimmings and clippings with a vacuum cleaner and spit into a towel. As you might imagine, going to the bathroom can be a major production in space. The WCS has a separate urinal and commode. The urinal is essentially a vacuum hose to which astronauts attach their own personal funnels.
Fans create suction to draw wastes into the commode.
Liquid waste is emptied into space. Solid wastes are not released, but are exposed to the frigid vacuum of space for dehydration and deodorizing. The system is much the same on Mir, except urine is actually recycled. Filters purify the liquid into clean water, which is then chemically broken down into its component parts, hydrogen and oxygen. The hydrogen is released into space, and cosmonauts can breathe the homemade oxygen.