Depending on your comfort level, a 7 hour layover at IAD could be long enough for a trip to downtown DC and back, however on a budget I would take a short bus trip ($8) to the subway station, then a train ride into the city.
If you don't want to travel too far away, a trip to the Air and Space musuem on the airport grounds would be perfect. I was in IAD last week and there are lots of signs that spell out where to catch the shuttle ($.50) and the museum is free to visit (as are all the Smithsonian's)
Dulles also is a fun airport to explore. For the budget traveler, they have a very nice and quite (free) chapel to rest in on the B concourse, lots of opportunities for plane spotting - especially when traveling on the "moon buggy" type shuttles between the concourses. There is a good thread in the UA forum that might allow you to find someone to guest you into one of the many UA lounges in IAD, and they used to allow pax to visit and observation level in the main control tower (it's been years since I lived near there so I don't know if that's still an option.)