Ringworm is a extremely contagious fungal infection that manifests into worm like rings on the skin or scalp. This disease can be contracted through direct contact with a pet or human. Because Ringworm needs a warm, moist place to grow, the gym or Dojo are potential breeding grounds.
To prevent Ringworm wash those TapouT shorts or Gi after each use, once you get home wipe down the inside of your gym bag with a disinfecting wipe or good 'ol Lysol and a paper towel. Shower after each training session and never share a towel with anyone, I would even go as far to not re-use my own towel from last nights shower either. After showering make sure that you dry thoroughly, especially inbetween your toes.
Staphylococcus Aureus is a bacterium that can infect the skin, it sometimes looks like a few nasty zits, boils or bugbites. Staph can also be contracted through direct contact and like Ringworm it grows in warm, moist places but it can live on dry places like mats and pads as well.
To prevent Staph make sure your gym or Dojo cleans the mats or pads at a minumum of twice daily. Make sure to wash your gi,shorts,rashguard daily. Do not roll or spar with someone if you suspect that they are infected and advise them to seek treatment. Always shower after your workout with a antimicrobial soap.