When a wave encounters a boundary, it can reflect and/or refract, leading to changes in direction and amplitude.