Defects in semiconductors introduce vibrational modes that are distinct from bulk modes because they are spatially localized in the vicinity of the defect. Light impurities produce high-frequency modes often visible by Fourier-transform infrared absorption or Raman spectroscopy. Their vibrational lifetimes vary by orders of magnitude and sometimes exhibit unexpectedly large isotope effects. Heavy impurities introduce low-frequency modes sometimes visible as phonon replicas in photoluminescence bands. But other defects such as surfaces or interfaces exhibit spatially localized modes (SLMs) as well. All of them can trap phonons, which ultimately decay into lower-frequency bulk phonons. When heat flows through a material containing defects, phonon trapping at localized modes followed by their decay into bulk phonons is usually described in terms of phonon scattering: defects are assumed to be static scattering centers and the properties of the defect-related SLMs modes are ignored. These dynamic properties of defects are important. In this paper, we quantify the concepts of vibrational localization and phonon trapping, distinguish between normal and anomalous decay of localized excitations, discuss the meaning of phonon scattering in real space at the atomic level, and illustrate the importance of phonon trapping in the case of heat flow at Si/Ge and Si/C interfaces.