A broad question, because there are many ways a nerve
can be damaged: compression
(carpal tunnel), crush, cut, etc.
A "bruised" nerve can heal itself; it grows back at about 1 inch/month. If the nerve is divided, it may occasionally heal, but more often needs surgical repair--and this doesn't always result in return of function.