How long can you have an STD?
forever until you die
Depends on the STD. Most (if not all) require Some medical attention and (obviously) can be transmitted to sexual partners (and sometimes other people you simply come in contact with). Best to get checked out by a clinic that specializes in STDs or a trusted medical professional ASAP.
Some, by nature of being a virus, will be in the body until after death. Others, until antibiotics are taken to kill the bacteria.
days months years life ?
Forever! No, seriously. There are various types of STD's, some viral, some bacterial, some parasitic. I don't know of any that your body can cure naturally. All of them seem to require treatment. However, you can live with most without treatment, but not without consequences. For example, most people know that after several years, without treatment, HIV leads to AIDS. Syphilis will remain for many years (10 to 20) but will eventually cause brain and or heart damage, and is ultimately fatal. Even the serious diseases, like chlamydia and the clap may cause sterility, and a variety of other health effects. To answer the question, without treatment STD's usually stay until you die, and sometimes they are the cause.
STDs will last until treated; viral STDs can't be cured.