$$\require{cancel}$$
Generally the loudness of a sound is related to the amplitude of the sound wave; a wave with bigger variations in pressure generally sounds louder. For any type of wave the energy carried by the wave is proportional to amplitude squared. This means doubling the amplitude increases the power by a factor of four (two squared). But the amount of energy reaching your ear also depends on the frequency since a wave with more oscillations per second (higher frequency) will mean the same amplitude hits your eardrum more often. Sound intensity is defined to be the energy per second (power in watts) reaching a given area (measured in square meters). Normal conversation has an intensity of about $$10^{-6}\text{ W/m}^{2}$$.
Unobstructed sound from a small sound source spreads out in all directions in an expanding spherical shape. Because the energy is spread over a larger and larger area as time goes on, the intensity decreases as you move further from the source. The area of a sphere is given by $$4\pi r^{2}$$ so the decrease in intensity is proportional to $$r^{2}$$ where $$r$$ is the distance from the source. This is known as an inverse square law and many other laws in physics follow this same law (diagram of the inverse square law). For example the gravitational field of the earth (or any other object) decreases as you move away from it proportional to an inverse square law. So does the electric field around an electron or proton. For practical purposes, what this means is doubling the distance decreases the strength by $$1/2^{2} = 1/4$$. If you move three times as far away the strength is $$1/3^{2}$$ or $$1/9\text{th}$$ as much. Shortening the distance by half means the intensity will be four times as much.