Molecules come into your body all day, in food, drink and medicines. Your liver is the organ that breaks many of them down and readies them to leave. It holds a large set of enzymes for the job.
Many molecules the body wants to clear are oily, and oily molecules do not dissolve well in the watery blood, so the kidneys cannot pass them out. The liver's answer is to make them more water-loving. One common move adds an -OH group. As the -OH groups on sugar do, a new -OH makes hydrogen bonds with water, so the molecule dissolves better. Once it dissolves well enough, the blood carries it to the kidneys and out in the urine. This follows the rule that like dissolves like.
Clearing the alcohol in a drink
Ethanol, the alcohol in wine and beer, already carries an -OH group and dissolves in water, so the liver clears it a different way: it oxidises it. You have seen the two steps. One liver enzyme takes two hydrogen atoms off ethanol to make ethanal, an aldehyde. A second enzyme adds an oxygen atom to make ethanoic acid, the acid in vinegar. The two carbon atoms stay joined the whole way.
Here the middle molecule, ethanal, is more toxic than the ethanol it came from. The second enzyme moves it straight on to ethanoic acid, which your cells break down for energy, so its carbon atoms leave your body as carbon dioxide in your breath. Some people carry a slow form of the second enzyme, so ethanal lingers in the blood and turns the face red after a small drink.