One of the most embarrassing everyday moments that one must experience when living on the International Space Station (ISS) is to excrete. It is also one of the most frequent questions among the curious and, above all, children.
The astronaut Tim Peake answer with great precision to this question in your book Why does the space smell like barbecue.
Go to the bathroom
Despite what we can imagine, going to the bathroom in the ISS is not very different from doing it on Earth. The ISS basin is an area the size of a telephone booth, and inside there are some foot restraints that are used to keep the astronaut stable.
It urinates in a hose with a conical receptacle that has a switch on one side. Pressing the switch starts a ventilation, that sucks urine so it doesn't float in weightlessness.
For major needs, there is a small toilet attached to a solid waste container with a reduced opening around which a rubberized bag with elastic closure fits, as he himself explains in the book:
Hundreds of tiny perforations in the bag allow air circulation, but not solid waste. The same urine hose switch activates the air flow in the solid waste container. When finished, the astronauts throw the rubberized bag (with self-closing) into the container and place another clean one for the next user. The solid waste container is changed every ten or fifteen days, although an ISS commander told me that if you put on a sterile glove and compact the contents, you can extend its useful life up to twenty days.