"Her feet go down to death, her steps take hold of Sheol"
Solomon says delicately, but clearly, that spending time with an adulterous person is a sure way to shorten your lifespan. You will be dead much quicker than you would have if you had not been sexually unfaithful.
It is amazing that people are trying to be quiet about the real danger of sexually transmitted diseases. These are real problems that really will destroy you and that is not even dealing with divorce, financial ruin, reputation, and violence.
The following is a partial list of the various sexually transmitted diseases. Some of these will kill you. Some will leave you sterile, some produce great pain, some cause cervical cancer, some allow for a higher infection rate of HIV/AIDS. Do not be a fool and give into the prompting of temptation.
Bacterial Vaginosis (BV)
Human Papillomavirus (HPV)
Pelvic inflammatory disease (PID)
In Solomon's time the various diseases and their differences and biological footprint would have been unknown. But because of his powers of observation, he and most were aware that playing around with a morally loose man or woman would cause you to get sick and potentially to die.
He is saying that no matter how strong the impulses are, don't do it because it will change your life.
What is also nice is that Solomon does not become vulgar in his depiction of the whole process of adultery. Those who commit adultery want to glorify the details of the sinful act. Those who want to get a real picture of adultery look at the whole life.