Elimination of pain sensations by topical application or regional injection of a drug (local anesthesia), or loss of consciousness during which patients are not arousable, even by painful stimulation (general anesthesia).