1. Vaginal SexVaginal sex is what most people think of as "sex" - specifically, when a man's penis enters a woman's vagina. It's the only form of sex that can lead to pregnancy, and it can spread sexually transmitted diseases (STDs), too.
2. Oral Sex
Oral sex is any kind of sex that involves contact between mouth and genitals. Oral sex can't get you pregnant, but it can spread the same STDs that vaginal sex can - which means that if you want to do it safely, you must use a condom or dental dam.
3. Anal SexAnal sex is any type of sex that involves pentrating someone's anus. It carries the same risks of disease as vaginal sex and oral sex.
Masturbation means touching yourself in order to feel sexual pleasure. Since you're doing it by yourself, there's no risk of pregnancy or STD - making masturbation the safest form of sex there is.