Let marriage be held in honor among all, and let the marriage bed be undefiled, for God will judge the sexually immoral and adulterous. [Heb. 13:4]
Marriage is sacred, so we need to respect another couple’s marriage and not interfere with it.
If we are married, we also need to respect our own marriage and treat it as holy, loving our own spouse.
Adultery is a sin that can involve very strong temptations (remember David’s sin against Bathsheba: 2Sam. 12), so we need to beware of the temptations and stay away from the person we are unhelpfully attracted to (Joseph even ran away from someone who was tempting him to sin against a marriage: Gen. 39:12).
If you are married to someone then you also need to grow closer to your own spouse, as Jesus loved the church and gave himself for it (Eph. 5:25-33).
In all situations where we are tempted to sin — and in our whole lives — we should also pray to God to ask him to help us to become people who hate sin (Ps. 97:10) and love righteousness instead (2Tim. 2:22): we are God’s workmanship and he will help us to mature (Eph. 2:10). Remember, too, to keep reading the Bible and following the commands that God gives us there (Ps. 119:9) — this is a big part of how God shapes us into people more and more like himself and his son, Jesus.