I think when someone takes a p*** or a s*** it gets split into atoms, then gets recycled for the food replicators (carbon, hydrogen, oxygen, etc.)
Essentially yes, without using such colorful language, the matter is broken down into it's constituent parts, and recycled into the replicator system.
One can assume that the unit itself probably resembles a standard toilet in basic function.
In "Little Green Men", it is referred to as "waste extraction". Maybe it's beamed out so you don't have to strain.