It is located about 40 kilometers from Hanoi city proper. Besides taking a taxi, if you have sufficient time, you may wish to consider taking the airport bus. Though not large, it is, after all, a capital airport, with peculiar movements here and there.
Actually, when I planned this weekend trip to Vietnam, I had already planned to Ho Chi Minh City. With a distance of 1,600 kilometers between Hanoi and Ho Chi Minh, I thought this journey was of unreasonable length: After glancing through the air ticket, I did not expect that this would eventually catch on with the Beijing-Shanghai line in China.