The number one way to prevent infection is by proper hand washing. Contact your local health department or CDC.gov for specific hand washing instructions. Generally: warm water, soap, scrub and...
To prevent urinary tract infections, drink cranberry juice. To cure yeast infections put plain yogurt into a tampon inserter (take the tampon out) and inject the plain yogurt into the vagina.