An exam and testing will easily distinguish a yeast infection
from an STD. If you have had sex and are having discomfort or
discharge, it is important to get tested.
By the colour and smell of the Discharge
The creamy white discharge that many women get monthly is caused by changes in hormone levels, it has very little odor and is not associated with any infection.
Discharge from a yeast infection is very itchy, it can look like cheese and has very little odor.
Some STD's cause a discharge and others don't. Some can cause a burning sensation when you pee and others cause none. The discharge associated with an STD usually is green or yellow and can have a foul odor.
The only way to know if you have an STD is to be tested, the only way you can help prevent getting or giving an STD (if sexually active) is to always use condoms.