How can I tell if I have an sti/std?

See a doctor. Best thing is to see a doctor and get tested.
Symptoms, tests. Depending on which std it is, you may have discharge, pain, rashes, ulcers, etc. The only definitive way to diagnose it is by getting a culture or blood test (depending on the std) done to test for the common stds. In the meantime, if you suspect an std, please protect yourself and others from acquiring new STDs or passing them to others.