General anesthesia makes you both unconscious and unable to feel pain during medical procedures. General anesthesia is commonly produced by a combination of intravenous drugs and inhaled gasses (anesthetics).
The "sleep" you experience under general anesthesia is different from regular sleep. The anesthetized brain doesn't respond to pain signals or surgical manipulations.
An anesthesiologist is a specially trained doctor who specializes in all types of anesthesia, including general anesthesia. After you're asleep (unconscious), your body's vital functions are monitored and your breathing is assisted and controlled.
In many hospitals, an anesthesiologist and another team member, a certified registered nurse anesthetist (CRNA), work together throughout your procedure to carry out these tasks.