The word extramarital describes relationships that happen outside of a marriage, between two people who aren't married to each other. An extramarital affair can damage a marriage.
The adjective extramarital is almost always used to describe a romantic relationship or encounter that happens between a married person and someone who is not the person's spouse. If a married man sneaks off to meet his secret girlfriend, you can say that the man is having an extramarital affair. In this case, the Latin prefix extra means "outside," and marital comes from the Latin maritalis, "of marriage or married people."