When a sound wave encounters a solid surface, such as a wall or a mountain, it cannot pass through it and instead bounces off the surface. This reflection of the sound wave results in an echo. The reflected sound wave travels back towards the source and can be heard as a delayed or repeated version of the original sound. The time delay between the original sound and the echo depends on the distance between the source and the reflecting surface.