“Adultery” is an affair in which a married person is involved.
“Extramarital sex” is an affair between poeple not married to each other. If neither is married to anyone else either, we have extramarital sex but not adultery.
Extramarital sex occurs when a married person engages in sexual activity with someone other than their marriage partner.