There are a variety of ways to avoid getting pregnant beyond abstaining from sex. Although nothing is proven to be 100% effective 100% of the time, it can be pretty close.
The most accessible form of birth control are condoms. There are male and female condoms, although the male condoms are more effective. Condoms are latex covers that go over the penis. They are tight fitting to they stay in place. They prevent the sperm from ever entering the vaginal. The condom also doubles as protective against STDs. There is also spermacide, which can be added to kill the sperm.
There is the birth control pill, which is a balance of female hormones taken over a three week period in between menstrual cycles. There is also the morning after pill, which can be taken up to 72 hours after sex, and will help to prevent pregnancy. The sooner the pill is taken the more effective it will be.
There are permanent birth control methods, which include a vasectomy or tubal ligation. These are both surgical procedures, which can be surgically reversed in most situations. As with all surgeries and procedures, the risks should be discussed with your doctor. For semi-permanent birth control, you can also get progestin rods inserted just under the skin in your arm. These work for three years before needed to be replaced. There is also the Depo Provera shot, which can prevent birth for three months at a time.
There are also cervical caps, which fit over the cervix and block the sperm from entering. There is the diaphragm, which is also inserted and blocks the sperm from entering. A vaginal ring is a small flexible ring, which is inserted in the vagina and slowly releases the same hormones in the birth control pill. Before deciding, you should speak with your doctor to fully understand all of your options.