We do know a few things. A general anaesthetic is carried in your blood to the nerves in your brain. We also know what properties a chemical needs to make a good general anaesthetic - it has to evaporate easily from a liquid into a gas, and it has to be soluble in fat. These properties covers proper anaesthetics like halothane, or other chemicals like paint stripper and nail polish remover - which sometimes have nasty side effects, like death. Another thing we know is that the better a chemical dissolves in olive oil, the better a general anaesthetic it is - but again, we don't know why.
Anaesthetics go back a long way in history.
The Ancients knew of alcohol, opium and hemp. Around 1800, the British chemist Sir Humphry Davey discovered that nitrous oxide could, after it made you silly, also make you unconscious. In 1842, the American surgeon, Crawford Long, used ethyl ether as a general anaesthetic. But Long didn't publish his results. Today, it's William Morton, an American dentist, who is given credit for the discovery that ether could be used as a general anaesthetic after he showed it off in a public demonstration of a tooth extraction in 1846.