Anaesthasia is a kind of sedation in which the subject has an induced, temporary state of coma and where he/she feels no pain. It is commonly used in Surgery. 

How it works is one of the greates medical mysteries of all time. No one knows, it first appeared in Ancient Greece and the reason behind the coma is unknown. So I can't really answer that part.