About this passageThe Katha Upanishad is a conversation between a boy, Nachiketas, and Yama, the ruler of death, who has offered him any boon he asks and has been refused three times over. These two verses open Yama's teaching. The distinction is between shreyas, what is good, and preyas, what is pleasant — not between right and wrong but between two things that both genuinely attract, and that lead to different places.
Yama said: The good is one thing and the pleasant another. These two, having different ends, bind a man. It is well with him who chooses the good. He who chooses the pleasant misses the true end.
The good and the pleasant approach man; the wise examines both and discriminates between them; the wise prefers the good to the pleasant, but the foolish man chooses the pleasant through love of bodily pleasure.
In plainer words
What is good and what is pleasant are two different things. Both of them take hold of you, and they end up somewhere different. It goes well for the one who picks the good. Whoever picks the pleasant misses what they were actually for. Both come and stand in front of you. Someone with sense looks at the pair and tells them apart, and prefers the good; someone without takes the pleasant, out of liking comfort.
A restatement in modern English, written for this collection. The passage above is the text; this is one way of putting it.