What city/airport do you ask about. Yes you can leave an airport but it depends on where it is to determine if it is worth it. You will need to pass through a security portal to renter and that can take a long time depending on which facility, time of day, etc.
BubRahUCuzE has gotten 2 cheers on this answer.
Either JFK or Detroit for about 5 hours.
You run the risk of missing your connection since you will be required to go through a security check again. Depending on how far you want to go, it would be a gamble with traffic.
You could try, but it would be a risk. Security checks out and back in can take quite a while, so you would at the very most have a couple of hours outside the airport.