You can't fly directly to Mecca as the holy city doesn't have an airport. This is done to respect both its sanctity and security. Instead, most visitors will arrive at King Abdulaziz International Airport (JED) in Jeddah.
King Abdulaziz International Airport has three terminals. The North Terminal is used for international and Umrah flights, the South Terminal for domestic flights, and the Hajj Terminal is used exclusively for Hajj.
Some pilgrims may first want to fly to Medina to see Al-Masjid An-Nabawi. If so, you'll arrive at Prince Mohammad Bin Abdulaziz Airport (MED).
The Prince Mohammad Bin Abdulaziz Airport is used for both international flights (including Hajj and Umrah) and domestic flights.