An infection can last anything from a few days to several months. Sometimes it clears up on its own, but in many cases treatment with antibiotics or other medication is required.