STDs are a sexually transmitted diseases caused by a bacteria or virus. You can get this bacteria or virus by having sex without a condom. During sex without a condom, there is contact between the penis, vagina, anus or mouth. These bacterias or virusses can be manifested in mucous membranes and can be spread through exchanges of semen, blood, pre-cum or vaginal fluids.
In addition, some STDs can also be transmitted through the mouth, through the hands or through a vibrator or dildo. Per STD, it differs how it is transmitted and how much chance you have of contracting the STD. The most common STDs are Chlamydia, Gonorrhea, Genital warts, Hepatitis B and C and Syphilis.
If you have an STD, you have a greater chance of contracting HIV as well.