The first modern flushable toilet was invented in 1596 by Sir John Harrington. He installed one for his godmother, Queen Elizabeth I. His invention included a water tank and a flush valve. However, the flush toilet wouldn't become popular for another 250 years. Most toilets in Medieval Europe were either holes in the ground, communal outhouses, or chamber pots.
If you were fortunate and born into considerable wealth, you might have used a garderobe (derived from the French word for "wardrobe"). These were small rooms built adjacent to the walls of medieval castles. The toilet was connected to a vertical shaft that extended down to the ground.
Low-ranking soldiers or servants were responsible for taking buckets of water to "flush" waste down the vertical shaft. Garderobes, which literally translates to "guarding one's robes," originated from the practice of hanging clothes in the shaft to kill fleas using the ammonia in urine.
Occasionally, daring knights would attempt sneak attacks by entering the castle through the shaft connected to the garderobe. Throughout history, there have been several famous people who died on the toilet, including King Edmund II of England (30 November 1016), Jaromír Duke of Bohemia (4 November 1035), Godfrey IV Duke of Lower Lorraine (circa 26 or 27 February 1076), Wenceslaus III of Bohemia (4 August 1306), and Uesugi Kenshin (19 April 1578).