Wash your hands frequently.The most important thing you can do to protect yourself from germs at the gym is to wash your hands frequently. Washing your hands with soap and water reduces the risk of transmission of viruses and bacteria. Wash them before and after your workouts, and after using fitness equipment. Avoid touching your face until you have washed your hands. Most gyms also have hand sanitizer available and it doesn't hurt to use that as well.
Bring your own towels and mat.It's best to bring your own towels and mat, especially if you're unsure of your gym's cleaning regimen. Place your towel down on any machine you're going to sit or lie down on. You might want to invest in an antimicrobial mat that prevents bacterial growth and odor.
Get out of your sweaty clothes.Once you're done with your workout, you should change as soon as possible. Your sweaty clothes are the perfect breeding ground for bacteria. If you don't have time for a shower, at least wash your hands or wipe them down with hand sanitizer.
Clean the gym equipment before and after use.All gyms should have spray bottles with cleaning solution and paper towels available. Don't assume that the person who used the machine before you cleaned it. Wipe the machine down before you use it and clean it again when you're finished. Clean the handles, key pads, and tension adjusters -- any place the person before you may have touched.
Keep your feet covered.Wear flip flops or water shoes when walking around the locker room or pool area to avoid picking up germs or fungus that can cause athlete's foot and other issues.
Keep your gym bag clean.To prevent germs from growing in your gym bag, remove your sweaty clothes, running shoes, and towels from your bag when you get home from the gym.
Stay home if you're sick.Do you want to catch a cold from a sick person at the gym? Of course not. And other people wouldn't want to pick up your sick germs either. If you have a cold, give yourself a chance to rest and recover and return to the gym when you are feeling better. If you feel up to working out, try exercising at home or outdoors instead.
More: Can I Run With a Cold?