The changing or bending of waves, especially sound and light waves, as they pass by and around obstacles in their path.