Narita airport is the one of the four airports located in metropolitan area of Tokyo. The others are Haneda, Chofu and Ibaraki. Haneda is the closest and busiest airport, Chofu is a small domestic airport for general aviation and flights to offshore islands and Ibaraki is a commercial airport sharing with self defense force's base which has few international flights.
Narita airport is the primary gateway of Japan, which has three terminals. Terminal 1 is used mostly for Star Alliance and Sky Team members, Terminal 2 for One World members and Terminal 3 is exclusively for LCC. When the airport opened in late 70s, there was only one terminal(terminal 1) but opened the second terminal in 90s and the third terminal few years ago.
Narita airport took over the function as the international airport in Tokyo from Haneda airport when it was opened and it was the only international airport in Tokyo until Haneda built the international terminal in 21st century(although Haneda had flights to Taipei due to political reason since the opening of Narita). Since then opening of international terminal in Haneda, major international flights moved to Haneda from Narita and therefore the number of passengers had decreased. However, due to increase of LCC flights, the number of passengers recovered quickly and Narita had to open the third terminal for LCC.
There are two train stations at Narita airport, Narita airport terminal station which serves for Terminal 1 and the Airport Terminal 2 station for Terminal 2 and 3. If you are flying in or out from Terminal 3, you have to walk roughly 15 minutes from the station or 5 minutes ride by shuttle bus.