There are cases of extra marital affairs in our world this days more than ever before, though the issues is not new in every society but the rate at which the cases has increased in the recent time really worth why one should take a study on some of the causes and how to avoid it.
The truth is that, extra marital affairs did not dignify any couple either he/she are a believer or not, from my own discovery some people unconsciously found themselves in it while some deliberately start doing it out of lust and desire to satisfy it.
Whichever way it happens, extra marital affairs is not good and it must be avoided because it is a sinful act. The Bible says in Exodus 20:14 “Thou shall not commit adultery” if unmarried person commit sexual sin it is called fornication, while if the married commit is called adultery.
For the singles the Bible says those who are not married should not defile the bed, Heb. 13:4. Extra marital affair is a sexual sin, therefore it is forbidden for all. Though extra marital affairs is a temptation that can come to any married couple but there are ways we can overcome it, not only by prayers but by doing what we ought to do in our relationships.
Below are the suggestions on how to avoid it:

Communication
Married couples should develop and maintain mutual communication such that they would be able to communicate their feelings, motives, desires and interests to each other at all time to enable a satisfactory relationship.
Extreme love and affection
Every spousal relationship is expected to begin with love and affection for each other which should be the bedrock for any relationship of such, that same love and affection is needed to power the relationship to keep going. Married couples should do all they can to ensure that their love for each other is extreme.
Understanding
If couple understand themselves, they know the needs of their partner and provide it even before the partner speak it out. Need are varies, it could be need for sexual need or anything that should be provided for by the other partner.
Relaxation
Married couples should ensure that they engage in relaxation, some of the couples are not used to doing this, it is very important be doing it so as to have some good time with each other, there should be time fun between couples in every relationship.
Abstinence
Married couple should try as much as possible to abstain from any individual or environment that can lead them to sexual immorality, such environment and individual must be avoided. The Bible says we should abstain from all appearances of evil. 1 Thessalonians 5:22
Determination
Strong decision must be made by both partners that they will never engage in extra marital affairs, most of the married couples that found themselves in it at one time or the other may not have a determination that they will never do it. Another thing is that, if a man has determination, it possible for him to resist temptation.
Be faithful to your partner
Married couple should ensure that they are faithful to themselves and the marriage vow. They must be committed to the marriage vow and take it serious. Extra marital is a sin of unfaithfulness to God and to partners.
Word of God
Married couples must know what the scriptures says about extra marital affairs, if they know the Word of God and receive it, they will have the fear of God in their heart and they will want to sin and disobey God.
Prayers
All what I have suggested may not help if there is no back up of prayers. The power of prayer must be engage to have a successful life and marital relationship, prayer is a divine stamina that can help man to sustain any good thing. No wonder Jesus said to the disciple to pray so that they will not enter into temptation.