The duration of STD treatment depends on the type of STD you are infected with. Some STDs can be cured with just one injection of penicillin, but some STDs take several months to cure. Besides the type of infection, the severity of the STD also contributes to the overall duration of your treatment.