If the contact has passed since more than a few days, no longer makes sense topharmacological prevention. Have to be tested in venereology. But in order to be tested for STDs, have to wait for weeks 3-4. Immediately after sexual intercoursetested does not make sense - the result of laboratory tests still will not be significant: the majority of sexually transmitted diseases (except gonorrhea) are going throughtheir incubation period. In the latter circumstance is connected and the lack of visible symptoms STDs in the first 3-4 weeks after infection.
There is also a second version of prevention through screening of random links to STDs - venereal diseases lead to their sexual partners and examine it (after all, if a person is sick with something, testing for infection will show a positive result). But thisscenario is, in practice, refers to the realm of fantasy.
You can always get tested for STDs or take medication prevention of sexually transmitted diseases, contact a doctor.