So, there are different methods for different agents. I know some gasses actually evaporate back out of your blood which is why it's good to remember to take nice full breaths after those procedures. Shallow breaths can leave small pockets of lungs not opening all the way which results in the agent flowing back into your lungs rather than being expelled.
For the very local anaesthetic agents, it's actually the flow of blood and other body fluids like lymph carrying it away from the location that will first stop it's effect. By diluting it, it reaches subtherapeutic levels in your whole body instead of a useful concentration in a single place. (Then I think your liver breaks it down from your blood.) Some injectable lidocaine actually has epinephrine mixed in specifically to constrict capillaries near the injection site and make the numb last longer. Providers have to be careful not to inject this type into places like fingers or penises because it could actually cut down blood flow long enough to kill tissues in the area.
The large majority of medications will either be broken down by liver enzymes or excreted into your bladder by your kidneys, though. You can find the info for a specific drug by looking it up on Wikipedia and checking the "metabolism" and "excretion" methods in the side bar.
So lidocaine specifically blocks nerve impulses by blocking sodium channels of the cells. Once those channels are functional again, the cells “wake up.”
Lidocaine isn’t permanent, however there are ways the numb nerves permanently, specifically using capsaicin to destroy the nerve.
Thanks a bunch, the bit about some evaporating was super interesting!