If you’ve ever had surgery, unless you are super tough, you’ve gone through it with the benefit of anesthetics. But, how do these body-numbing elixirs work?

Prior to the invention of anesthesia in the mid-1800s, surgeons had to hack off limbs, sew up wounds and remove mysterious growths with nothing to dull the patient's pain but opium or booze. While these drugs may have numbed the patient, they didn’t always completely block the pain, or erase the memory of it.

Since then, doctors have gotten much better at putting us out with drug combinations that ease pain, relax muscles and, in some cases, put us in a deep state of hypnosis that gives us temporary amnesia. Today, there are two primary types of anesthesia drugs: those that knockout the whole body (general) and those that only numb things up locally.

Local anesthetics block the nerves that connect a particular body part or region to the brain, preventing the nerves from carrying pain signals to your brain. Examples include novocaine shots, which dentists use to numb the nerves in your mouth during a root canal, and epidurals, which allow for a (relatively) painless childbirth by blocking the nerves that originate at the base of the spinal cord and serve the pelvic region.

For serious surgeries that require a patient to be completely unaware, doctors turn to general anesthesia. This renders patients unconscious with no perception or memory of the surgery (though pain from the surgical procedure will be apparent once you wake up). It also limits the physiological responses to surgical cuts, keeping blood pressure, stress hormone release and heart rate constant during the procedure.

The earliest examples of general anesthesia include ether and chloroform. But, there is a fine line between the amount of these drugs needed for surgery and the amount that can be fatal; these drugs were often administered with nothing more than a soaked sponge to the nose, which made it hard to control the dose.

Today, the most common modern general anesthetics are mixtures of inhalable gases, which include nitrous oxide (laughing gas) and various derivatives of ether, such as Isoflurane, Sevoflurane, and desflurane. Skilled anesthesiologists administer the drugs via machines that measure the specific amount necessary to keep the patient out for the surgery, but not forever. Additionally, because the drugs interfere with breathing, patients are often intubated — meaning a plastic or rubber tube is inserted in the trachea to keep the airway open — and kept on a mechanical ventilator.

Despite their necessity in modern medicine, scientists aren't sure exactly how anesthetics work. The best theory suggests that they dissolve some of the fat present in brain cells, changing the cells’ activity. But, the precise mechanisms remain unknown. For now, next time you find yourself under the knife, just be happy they do.

Follow Life's Little Mysteries on Twitter @llmysteries, then join us on Facebook.