These words are not easy to understand, if you take them out of context. However, if you look at these verses within the chapter and more importantly within the book, then you will be able to see the point much more clearly. Let me give you three points to get you started.
First, the book of Proverbs is setting up two paths. There is a path of wisdom and the path of foolishness. Both call out to people, but the outcomes are different. Wisdom leads to life and folly leads to death. This chapter is roughly broken up into these two parts as well.
Second, this chapter calls people to seek wisdom and shun folly. The first three verses set this point up.
1 My son, pay attention to my wisdom,
turn your ear to my words of insight,
2 that you may maintain discretion
and your lips may preserve knowledge.
3 For the lips of the adulterous woman drip honey,
and her speech is smoother than oil;
Third, the particular exhortation is to shun adultery. Instead a wise man will enjoy his marriage and the wife of his youth. In other words, there is a strong emphasis on marital fidelity. This is why Proverbs 5:20 states: "Why, my son, be intoxicated with another man’s wife? Why embrace the bosom of a wayward woman?"