They are both technically right, but the majority of people would say 'an' STD. When talking about something that begins with a vowel-sounding letter, we tend to use 'an' - it just sounds better to...
Here's a site with more info on STDs... http://linkisking.com/jk.cgi?i=D8dRZeY&d=www.epigee.org%2Fguide%2Fstds.html%20&n=15 copy and paste the link No they have to have the STD in order to...