When sound waves travel, they transfer energy from one part of the medium to another part of the medium. And this energy transfer depends upon amplitude of the wave. Higher the amplitude, louder is the sound.
When receiver is close to source of the sound, the sound is loud. And as the distance between receiver and source increases, the sound starts fainting.
Because when the distance between receiver and source increases, the energy spreads out in comparatively larger area. Hence, the energy of medium i.e., air decreases, which decreases the amplitude of vibrations.