First Father Wins

One quick way to establish conflict for a male lead (and it is almost always a guy used in this trope) is to make them a divorced father. The story will usually open with a first act divorce or some time after it has taken place, with the children old enough to start resenting their dad for "leaving them". For whatever reason things didn't work out with his Love Interest and they separated, with her usually keeping near complete custody. Their relationship will never be completely civil or free of UST, because the lead thinks they should get back together which his ex wife will rebuff because "You haven't changed" the underlying character flaws that led to the divorce.

For whatever reason, it's always implied it's the dad whose flaw(s) led to the divorce; While the ex may be snarky, resentful or exasperated in their interactions, neither the lead nor usually the children will act as if she was the problem (she's the Love Interest after all). Still, just as often this makes us sympathise with the father more, if she comes off as seriously insensitive or unforgiving in the course of this.

Of course, she will have either remarried, gotten a fiancé or is seriously dating someone else. Since she has custody of the kids, the First Dad will be worried the Step Dad will win them over because he has more time with them and he's handsomer, more successful, more empathetic and an all around better dad. The kids, usually boy and girl pair, will have one of four relationships with the First Dad and Step Dad: passive aggressiveness, wary distance, civil cohabitation, or a loving and respectful rapport. For variety and contrast, they usually each have a different relationship with the dad and step dad.

As the plot progresses, he'll win back his ex wife, the Step Dad will be revealed to be a Jerkass and get killed off or sent packing, he'll completely patch up his relationship with his kids and they'll all reunite and live Happily Ever After. The End.

Except, of course, when it's subverted. The First Dad might not get back together with the ex and only patch up his relationship with the kids, or the family may decide the First Dad not only hasn't changed but is a jerk for manipulating them into getting back together.

See also The Parent Trap.

Film

 * 2012 mixes it up a bit. Step Dad Gordon is a Nice Guy, saves their lives twice, and has honestly won the love and respect of his kids. Of course,
 * While there's no romantic rival, reuniting with his wife and daughter is Foster's primary motivation in the movie Falling Down. Since it's a drama, it doesn't end well:
 * It's a bit more subverted than that. Foster doesn't just have "frustrating flaws" the way so many First Dads have; he's insane to the point that his own mother is terrified of him, and his ex will do anything to keep away from him.
 * The Belgian film Le huitieme jour involved this as a major part of the plot.
 * Mrs. Doubtfire has the example of Robin Williams cross-dressing as a nanny to spend time with his kids, while meanwhile Pierce Brosnan romances the ex. Partially subverted when it leads to his ex-wife gaining full custody. Double Subverted when the ex-wife allows the dad to visit the kids anyway and Robin Williams takes the cross-dressing professional with a motivational childrens' show.
 * Night at the Museum has something similar. Ben Stiller's character main motivation is proving himself a worthy father to his son, and to himself, but he and his ex-wife have an almost sibling like relationship, with absolutely no UST and Paul Rudd, the step-dad, is shown as goofy but dedicated and never actively tries to get between Stiller and his son. Which makes him all the bigger threat.
 * The Royal Tenenbaums has Royal try this to return in good graces with his family, including getting rid of his ex-wife's suitor by pretending to have stomach cancer. The Step Dad eventually sees through his ruse and they kick him out. They do eventually forgive him though.
 * The War of the Worlds with Tom Cruise has this set up, and plays it to a T except for the reunited parents.
 * Weatherman with Nicolas Cage has this set up... which
 * Liar Liar
 * The Full Monty has Gaz trying to raise the money so that he can keep seeing his son on weekends. He goes about this by... unconventional means, which backfires.
 * O Brother, Where Art Thou? has the wife of the protagonist (a convicted felon) attempt to marry a man with an honest living, whose worst fault appears to be that of being boring. Interestingly, the step dad
 * The Santa Clause doesn't have the main character and his ex-wife get back together, but he does patch up his relationship with her and her new husband, so his son isn't torn between them anymore.
 * Gender swapped and subverted in Definitely Maybe. A closer look at the movie may suggest that daughter Maya asks her father about how he met her mother to encourage him to rekindle old feelings. But when he tells her about the three major women in his life
 * In Taken, Bryan's wife divorced him because of his time-consuming job as a special forces commander. She has remarried a millionaire and has custody of his daughter, Kimmy. Their relationship is summed up at Kimmy's birthday party, when Bryan gives her a karaoke machine, but her stepdad gives her a horse. The trope is ultimately subverted in that even though he regains the respect of his daughter and ex-wife after rescuing his daughter from kidnappers, they don't reunite as a family.

Live Action TV

 * Ray Drecker,Thomas Jane's character in Hung, essentially follows this trope.
 * The father in Unhappily Ever After reluctantly does this. After they divorce in the first scene of the first episode he moves into a bachelor apartment; then eventually moves into the basement of his former home; and finally back upstairs with his wife. Then his wife is killed off so they could give more screen time to The Hot Chick.
 * Danny "Danno" Williams and his ex-wife Rachel play this trope to the hilt in the Hawaii Five-O reimagining; however,  Time will tell what happens to their relationship from there.
 * Earl Hickey of My Name Is Earl is a divorced father (his first wife left him for a mutual friend while he was doped up on morphine at the hospital). His children, however, are still young enough not to resent him for leaving, and even refer to him as "old daddy," and he finds out that

Video Games

 * This is part of the storyline of Mutatsu, the Tower Social Link in Persona 3, minus the step-father.

Western Animation

 * If you see the toys-as-parents theory, then Woody of Toy Story is like this, being Andy's favourite toy, even more than "stepdad" Buzz Lightyear.