If you want to avoid pregnancy, then you will need to take appropriate birth control measures. Unprotected intercourse even just once can lead to a pregnancy, so the best way to avoid pregnancy is to never have sex without birth control.
There are several different options if you want to avoid pregnancy. The most common form of birth control used is the barrier method, which keeps the semen from entering the vagina. Male and female condoms and spermicides are all barrier methods used to avoid pregnancy.
Hormone methods, withdrawal, natural family planning and sterilization are other options if you want to avoid pregnancy.
Not all of these options are appropriate for preventing a sexually transmitted infection, so if you are not in a long-term monogamous relationship, you will need to consider that as well. Your health care provider or Planned Parenthood clinics are good places to go for birth control information.