ICAO Airport Identifiers
Quite a good overview.
Unfortunately the system as explained appears to fall down for several UK fields - often at the 3rd letter stage (FIR) viz.: Stansted, Gatwick, Luton, Norholt, Biggin Hill, Southampton, Southend to mention a few at random.
More airports than letters available? or possibly historical reasons??