The physics of radiation damage in particle detectors