If your layover in Kuala Lumpur is more than 6 hours, you are allowed to leave the airport and explore the city. Just be sure to have your passport and boarding pass handy so you can easily return to the airport in time for your next flight.
There are also a few other things to keep in mind if you decide to venture out during your layover:
The currency in Malaysia is the ringgit (MYR). Make sure you have some local currency on hand so you can purchase food or take transportation around town. Most small shops prefer to accept cash.
Kuala Lumpur is a huge city, so it’s best to plan and figure out what you want to see and do. There are plenty of tourist attractions, restaurants, and shopping districts.
Check with Malaysia Immigration Department if you need a Visa to exit the Airport Terminal.