in order to understand how airplane lavatories work we need to first understand how the basic home lavatories works.
The principle of operation of a home toilet or lavatory is based on the science of gravity. When u flush a toilet u create a siphon that hence drains the bowl, gravity then takes over and pulls it from the bowl to the sewer system or septic tank depending on where you are. water is also flushed and refilled simultaneously.
in a plane scenario the lavatory system is much different in that it relies on the principle of vacuum instead of siphoning are are hence known as vacuum toilets. The same technology is used in trains, boats, buses or other locomotives to avoid water splashing out while ur doing your business.
in airplane lavatories when u flash, it opens a valve in the sewer line, and the vacuum in the line sucks the contents out of the bowl and into a tank.Little water and blue sanitizing liquid is then used to clean toilet for the next user.
It should be noted that there should be no smoking in flight specifically lavatories area, the lavatory cannot be used at any specific time, there’s a baby changing table in the lavatory hence babies cannot be changed anywhere and babies below ten years should not be allowed to go to the lavatory alone.
In the past the airplane used bucket and bottle systems where u basically did ur business in a bucket or bottle. it latter advanced to a more primitive open toilet system where literary when you opened the lid you could see the ground below which meant you shit or peed of the sky. This later advanced to flush toilets. This was ok but it later paved way for a better technology which is still used today i.e the vacuum toilets. The waste before was stored directly bellow the toilet but nowadays the waste is pushed to the the far end of the plane below the empennage to reduce the stink.