Dubai is a crossroad of the modern world. If you don’t go there as a destination in itself, it is likely you will stop through there if traveling in the Middle East, Africa or Central Asia. And if traveling through Dubai, it is definitely worth the layover.
If you have a long layover, Dubai is an easy city to see. Go through immigration and take the metro into the city. The metro is easy to navigate. If your next flight isn’t until early AM (as mine always seems to be) then I usually take a taxi back to the airport.
If you only have a few hours in the city, especially later in the evening, head to Dubai Mall and Burj Dubai (the world’s tallest building). The mall is amazing and overwhelming (over 1000 stores). I have never bought anything other than food but still love to get lost in its maze. If you have the time and money, you can also go skiing and scuba diving while at the mall! If you plan to go up in the world’s tallest tower, make reservations on line ahead of time (last time I was there they were sold out for the next several days) and plan to spend some money for the thrill.
If you have more time, and are there during the day, then I recommend taking some time to see the historical side of Dubai and wander the streets of Bastakiya and visit the museum at Al Fahedi Fort. Also wander the spice, fish and gold souks for shopping, people watching and just to soak in the Middle Eastern flavor, sights and smells. And of course a trip to the creek and fountains are a must. And if you have several days, consider a tour into the desert to ride a camel or dune buggies through the sand.
And even if you can’t afford to stay there, check out some of Dubai’s amazing luxury hotels. Dubai has the world’s only 7-star hotel, Burj Al Arab, an Underwater Hotel and in 2018 Hilton will open a hotel with an indoor rain forest.