There are two main passenger airports used for Kuala Lumpur, KUL and SZB. 

KUL is the IATA airport code for both KLIA1 and KLIA2 located at Sepang, and SZB is the IATA airport code for Subang airport ( Sultan Abdul Aziz Shah Airport ) which once was the international airport until KLIA opened. 

KLIA1 / KLIA2 is 40-60mins / 50 km south from Kuala Lumpur
Subang is 30mins / 26km west of Kuala Lumpur
KLIA / KLIA2 at Sepang is 55 km from SZB at Subang 


SZB at Subang = Sultan Abdul Aziz Shah Airport aka Subang [International] Airport.  This was once the international airport from 1965 to 1998 when it had 3 terminals, only T3 is now used. It is the home of FireFlyz and Berjaya Air, flying mainly domestic Malaysian routes and short routes into neighbouring Thailand or Indonesia .   Now that it is a regional airport Subang does not have 24 /7 facilities, so shops, eateries and taxis may be very limited at none peak times.

KUL at Sepang = KLIA1 and KLIA2 terminals, it is only 1 airport and has been the main international airport since 1998 and is the home of Malaysia airlines and Air Asia. The majority of tourists and travellers will use the 2 terminals at this airport
KUL is the IATA code for Kuala Lumpur and shared by both  KLIA1 and KLIA2 which ARE the same airport!

 

KUL

If you think some of the bigger airports in the world like Heathrow it is made up of several terminals (T 1, 2, 3, 4 ,5!) etc. All terminals are LHR and are the same airport.

KLIA1 and KLIA2 are different terminals at KUL (Kuala Lumpur airport). The airport started life with just the one terminal, but when Air Asia developed LCCT (or low cost carrier terminal) was hastily built as a temporary stop gap until the new / extended terminal for the low cost carriers was completed as KLIA2.

Flying MH or Malaysia Airlines you will be arriving into KLIA1 at KUL also known as TERMINAL M, whilst Air Asia is a low cost carrier, so arrives into KLIA2.

To sort of add to the confusion KLIA1 is split into 2 buildings where you check in and clear immigration in one building and then seamlessly move to another via a little monorail or walkway. Wide bodied planes (747 / A380 / 777) normally from international destinations (like the UK) will arrive into the satellite building.

The satellite building is not independent but connected to the main building by a small railway or aerotrain.   Even if you arrive at the satellite building you will go to the main building to clear immigration, collect your bags and exit the airport. 

The only time you would remain in the satellite building would be if you are transiting with 2 long haul flights. 

If you need to get from the main to the satellite (or vice versa) it takes only a few minutes. So if connecting from a long haul to short haul then short connections with Malaysia airline are not uncommon

The transit hotel - SamaSama Express - is at the satellite terminal inn KLIA1, there is another at KLIA2.

 

SZB

This airport was the international airport for Malaysia by air for decades  (until the opening of KUL) and it is popularly known as Subang Skypark rather than its formal name of Sultan Abdul Aziz Shah Airport. 

Since KLIA opened only Terminal 3 of the old airport is used by regional airlines and is now a small airport.