Yes, you can go to see the city. You can move to go out of the airport for most layovers if you have VISA (if necessary). Some cities even have free tours for people on layovers.