IATA Codes are identifier codes used by the International Air Transport Association (IATA).
IATA is a trade association of the world's airlines founded in 1945 in Havana, Cuba. It was the successor to the International Air Traffic Association, which was formed in 1919 at The Hague, Netherlands.
IATA codes are used to identify both airlines and airports. Historically these codes arose out of the need for pilots to easily identify city locations.

History of IATA Codes
Originally two letter national weather service codes were used for city identification but as airports expanded across many cities there were not enough code combinations to satisfy demand and a three letter airport code system was introduced.
IATA airline codes were originally based on the International Civil Aviation Organization (ICAO) designators which were issued in 1947 as two-letter airline identification codes.
IATA expanded the two-character-system with codes consisting of a letter and a digit (or vice versa) after ICAO introduced a three letter airline code system in 1982.
How are Codes Used?
Today, both IATA and ICAO codes are used to identify commercial airlines and airports.
IATA codes are generally public facing codes, used for airline timetables, reservations and baggage tags. ICAO codes tend to be used operationally by airlines and airports for less public facing activities such as in ground and flight messaging, however may also be seen on popular flight tracking services.
Example of Airline IATA and ICAO Codes
IATA Code AA American Airlines
ICAO Code: AAL American Airlines