The fastest way to get to Tokyo from Narita Airport is to take the N’EX (Narita Express) train. You can depart from either terminal and choose from a number of arrival stations including Shinjuku, Tokyo, and Shinagawa.
If you are transferring to the Keio Highway bus bound for Hakuba you will want to get off at Shinjuku Station. If you plan to take the Shinkansen (bullet train) bound for Nagano, you should get off at Tokyo station.
The journey will take from 65 – 105 minutes depending on your departure time and destination. The one-way fare to Tokyo station is 2940 yen. If you wish to get off at Shinjuku, Shibuya, Shinagawa, or Ikebukuro the fare will be 3110 yen.
UPDATE: JR is now offering discounted return tickets on the N’ex to foreign passport holders. More here.
For more details on fares, departure times, combination tickets, and online reservations click here.
Keep in mind, trains station are often underground and require maneuvering up and down stairs and escalators, or elevators if you are lucky. If you have more bags than you have the strength to carry, I highly recommend taking the bus to Tokyo instead. You can read about the Narita Aiport Limousine bus here.
If you would rather not stop in Tokyo at all, and come directly to Hakuba from Narita Airport, you can take the shared Chuo Taxi. To find out more and to make your (required!) reservation, click here.