What did the doctor give you medicine for?
The medicine for a bacterial infection may cause a yeast infection. The medicine for a yeast infection will not cure a bacterial infection, and the medicine for a bacterial infection will not cure a yeast infection. So unless both were treated, you could still have one, or one may have caused the other.