A marriage in which adultery is acceptable to both parties is known as an open marriage.
Historically adultery was been subject to severe sanctions including the death penalty and has been grounds for divorce under fault-based divorce laws. The method for punishing adultery was traditionally stoning to death.
In some jurisdictions, adultery is still illegal. Enforcement of laws against adultery is often uneven -- in many places, women are punished more harshly than men, in some cases being considered guilty of adultery even when they did not consent to sex.
Many countries practicing Islamic Sharia law retain the death penalty for adultery.
See also:
Penalties for adultery