For most layovers, you can leave the transit area (and airport) in between flights, as long as you have a visa (if necessary). You must pass through customs and immigration on the way out. You must also clear with security on your way back into the airport. While it is discouraged to leave an airport when awaiting a connecting flight, if it is necessary, please notify a customer agent so you can be contacted if the flight arrives earlier than scheduled.