As mentioned above, most hotels have gyms that vary in size, quality, and cost. The smaller and cheaper the hotel the smaller and less-well-equipped the gym will be but at the fancier places like Bellagio, Caesars Palace, and Wynn Las Vegas, their workout facilities rival major fitness centers for their size and scope.
Usage of the gyms is not free, generally speaking. Most charge a daily fee that can range anywhere from $15-30 per day per person. This fee usually gets you access to the spa facilities as well like the sauna, jacuzzi, etc. Many hotels that charge those nefarious "Resort Fees" are including gym access in the daily charge so it won't cost you anything extra but it still isn't free.
If you are already a member of a national chain gym in your hometown, they may have an outlet here in Vegas that you can use for no additional cost. 24 Hour Fitness, for example, has more than a dozen clubs around the Las Vegas area.
There are some local gyms that offer day passes to visitors. Ask the front desk or hotel concierge for the ones nearest you.