WiFi uses RF to transmit data. The signals amplitude decreases as it travels away from the source. Think of the area of the wave increasing. As the area increases, the amount of signal that hits the receiving antenna is decreased (most of the signal spreads out in other directions). The rate of decrease is affected by the material the wave passes through. Even if the wave hits no obstructions, it will still decrease. This is called Free Space Path Loss. The free space path loss in dB can be calculated according to the following equation:
FSPL (dB) = 20log 10 (d) + 20log 10 (f) + 32.44
As you can see, the loss is proportional to both the distance and the frequency. The higher frequencies (of the 5GHz band) will be attenuated more than lower (2.4GHz) frequencies. This is one reason why 2.4GHz WiFi bands cover a larger area than 5GHz bands.
When an RF signal passes through other materials such as walls, windows and people, the annuation is greater than the FSPL.
Antennas are used to amplify the signal. Remember antennas amplify both the transmitted signal and the received signal. So an antenna on an AP will improve the reception of WiFi signals as well as the transmission.
The link budget is the combination of gains and losses between the transmitter and the receiver. It is the transmit power – cable loss + transmit antenna gain – path loss + receive antenna gain – cable loss.