Upvote:4
You can certainly leave the airport as long as you have proper entry credentials for the country. You either need a full visa for China or depending on your citizenship you may be able to get a transit Visa: https://www.travelchinaguide.com/embassy/visa/free-72hour/