Cellulitis is generally the result of bacteria that get in through openings and cracks in the skin. This can often happen from the bacteria being under your fingernails. Proper handwashing and body hygiene can help prevent the bacteria that cause cellulitis from entering your body.