As far as the GOP goes, the anti-Trump Republicans blew it, honestly. They should have united early, in favor of one candidate.
The anti-Trump Republicans were split between the moderates backing Kasich/Jeb etc. and the hardline movement conservatives backing Cruz. That's how Trump won: he happened upon a directionless, deeply split party and as an outsider was able to play the unifying candidate.
The only candidate who could have stopped Trump was Cruz, and like hell were the "establishment" going to throw their weight behind someone they hated even more.
Walker did the right thing by dropping out early (he was one of my favorites, but in terms of unity, it was right). The GOP candidates didn't do anything to attack Trump in his weak moments, and there were A LOT of weak moments.
Hahaha, what? They were always on the attack, rather indiscriminately. But as Trump pointed out, everyone that attacked him ended up going down in flames right after the fact. Arguably Kasich got as far as he did because he didn't attack much, and Cruz waited until the end.
Hillary was lucky enough to pull off the Popular Vote.