Answer: Death by stoning.
This law was called Zina.
Because the conditions for proving adultery were very demanding, there is no record of the punishment being actually carried out according to law.
For example, the testimony of four eyewitnesses who witnessed the act of penetration was required; or a four-time confession of the accused (without any retractions) was required.