Anesthesia is the use of medicines to prevent pain during surgery or other procedures. These medicines are called anesthetics. They're given by injection, inhalation, topical lotion, spray, eye drops, or skin patch. They cause a loss of feeling or awareness.