This is not a forced 24-hour transit, I suppose. Assuming you are flying Emirates, if you taking the first flight to your next destination from Dubai and have to wait for a day, you can get Emirates to put you up for a day.
If you'd like to go to the city, you can store your luggage in a baggage facility in the arrivals hall. Then, take a local bus for twenty minutes to the City Centre Mall. The bus actually stops a few streets away -- you can walk fifteen minutes to reach the mall. Sign-up for the daytime and/or nighttime hop-on/hop-off 'Big Bus Tour' at the mall. The tour can start and end at this mall. The ticket includes a ferry ride along the Dubai Creek and entrance to some museums. You can spend a lot of time in any of the malls along the way and return to the City Centre Mall. Then catch the city bus back to the airport. If you are flying Emirates, the airline can arrange a visa for you, if one is necessary.
Alternatively, if you want to just stay at the airport, you could book a room at the expensive airport within the terminals. You could spend up to 8 hours at the Marhaba lounge near Gate 103 in Terminal 3.
Dubai city is worth a visit. The combination of ubiquitous superlatives, frenzied construction, and the wealth on display is quite an experience. Enjoy!