Ned Ravine, who's both a police officer and a lawyer (who often defends the people he arrests), believes that he knows everything about women, and says that he'll throw away his badge if anyone ever proves him wrong. While on a stakeout, he encounters a seductive woman named Lola Cain; the next day, Lola shows up at his law office, saying that she needs him to look over some papers she's come across. Meanwhile, Max Shady, who was just released from prison after seven years, starts stalking Ned, planning to kill him for failing to successfully defend Max in court.
Ned's wife Lana and her auto mechanic Frank, with whom she's having an affair, start plotting to kill Ned in order to collect on his accident insurance, which has a triple indemnity rider; if Ned is shot, falls from a northbound train, and drowns in a freshwater stream, Lana will collect nine million dollars.
Lola gets Ned to come to her house to examine the "papers", which are actually a laundry receipt and an expired lottery ticket, and the two of them end up having sex in various wild ways (while falling down a flight of stairs, in the refrigerator). The next morning, Ned says that they can never do that again because he loves his wife; this drives Lola to start stalking Ned.
A few days later, Ned takes the train to go to a legal symposium; Lana and Frank are also on the train, and so is Max. When the train passes over a lake, Lana shoots Max 36 times with a revolver, mistaking him for Ned, and he backflips through the door to his death; Ned thinks that Lana had acted to save his life. He arrests Lana, and then defends her in court, getting her cleared of all charges. Lana later kills Frank, believing that he was going to abandon her, by pinning him against a wall with his power drill; Lola witnesses this, and starts blackmailing Lana.
Ned confronts Lola, and learns that she and Lana are identical twin sisters; after Lana had smashed Lola's face with a shovel, the doctors had given her a whole new face, causing the man she loved to leave her for Lana (who now looked more like Lola than Lola herself); Frank was the man's son. Lola's plan from the beginning was to get revenge on Lana by seducing her husband and ruining her marriage.
Later, Ned's secretary Laura Lingonberry tells Ned about Lana's plans to kill him, having figured it out herself. Upstairs, Lana is attacked by Lola, who drowns her in the bathtub. While Ned goes upstairs to investigate, Laura's abusive husband (whom she'd escaped from three years ago) comes in and confronts her; she kills him with a frying pan. Lola and Ned fight, and Lola falls to her death from the second-floor landing after Ned pushes her back with a powered-up hair dryer through a broken handrail (which Lana had sawed off earlier). As Ned and Laura embrace each other (and Ned throws his badge away), Lola and Lana come back to life and attack; Laura shoots them both. Ned and Laura marry a few days later.

Question: Who is Ned's wife having an affair with?
Answer: Frank the auto mechanic
Alternative answer: Frank