Can I get an STD from having anal sex, even if I am wearing a condom? I am a teenage guy just thinking about being safe.
If you are concerned about safety, you should consider both your physical and spiritual safety.
Let's start with the physical aspects. A condom creates a physical barrier against many diseases, but there are diseases which are not stopped by condoms. Sexual diseases are passed through bodily contact. It is because the skin on the penis is so thin that some diseases, which are hard to get in other ways, are easily passed during sex. Condoms decrease the amount of skin-to-skin contact, thus decreasing the odds of a disease being passed. However, it cannot make the odds zero. One reason is that a condom does cover the entire shaft of the penis. There is usually a gap near the base. Another reason comes from the fact that condoms need to stretch. It means that there are microscopic holes in the condom. These holes are smaller that most germs and fluids, but some viruses, like HPV that causes genital warts, are thought to be able to move through a condom barrier.
The rectum contains a high number of germs. It should also be pointed out that the colon walls are thin and don't take abrasion well, even that of a penis moving in and out. Let us consider whether the insertion of the penis into the rectum of another person is it a normal act of sex. According to numerous medical sources, anal sex is particularly risky because it causes bleeding. The anus is not normally large enough to accommodate an erect penis. As a result, the skin surface tears as the penis is forced in. The lining of the rectum is not designed to be poked and prodded, and so during sex, it too is damaged and tears. It doesn't take a genius to realize that bacteria present in the rectum does not belong in a person's blood stream. This is why sexually transmitted diseases are rapidly transmitted in the homosexual community. The wounds caused by anal sex gives various diseases easy access to internal systems of the body. In other words, it isn't just the diseases passed to another person which are the only concern. The people receiving anal sex are setting themselves up for diseases from their own bowels.
Also, during sex there is more skin-to-skin contact than just the penis and those areas are not protected.
Even in vaginal intercourse, condoms are not 100% effective. They can and do fail through ripping. They can roll up, exposing the shaft of the penis or even roll off. And it is well documented that people using condoms are not always consistent in using them. There are times the guy wonders what it is like to have sex where the condom doesn't interfere with the sensations. But the most common failure of condoms comes from laziness. The person is too wrapped up in sexual feelings to stop and put a condom on.
Since you are a teen, I will conclude that you are not married. Sex, in whatever form, between unmarried people is a sin. The old word for it is "fornication." "Do you not know that the unrighteous will not inherit the kingdom of God? Do not be deceived. Neither fornicators, nor idolaters, nor adulterers, nor homosexuals, nor sodomites, nor thieves, nor covetous, nor drunkards, nor revilers, nor extortioners will inherit the kingdom of God" (I Corinthians 6:9-10). Sex within marriage is approved by God, but condemned when it is outside of marriage. "Marriage is honorable among all, and the bed undefiled; but fornicators and adulterers God will judge" (Hebrews 13:4). Having a condom on your penis doesn't make you safe from sin.