Dr. Yueh is the doctor for House Atreides—and he's their eventual betrayer.
In literature, there are generally two kinds of traitors. The first kind betray their friends or kingdom because they want to. Maybe they will get riches in exchange for their services, maybe peace, or maybe they just get a kick out of seeing others suffer. Iago, we're looking at you here, buddy. The second type of traitor is the type who is blackmailed into betraying friends or kingdom. Yueh fits into this category of classical turncoat.
Yueh is supposed to be under Imperial Conditioning, meaning he's mentally modified against even the thought of taking human life. But the Baron Harkonnen has Piter kidnap and torture Yueh's wife, Wanna. The resulting agony breaks Yueh's Imperial Conditioning, and he agrees to betray Duke Leto in exchange for Wanna's life.
Since Yueh is a Type II traitor, he does not go entirely along for the ride. He implants Leto with a poisonous tooth in an attempt to kill the Baron Harkonnen. He also helps Paul and Jessica escape the Harkonnen invasion, ensuring their safety—and ensuring that the story doesn't end rather abruptly.
Yueh's internal monologues also provide an intense source of dramatic irony throughout the first third of the book. After all, we know he's a traitor, but the Atreides clan remains blissfully unaware.