Obama didn't win. Romney lost.
Romney lost because he lost two and a half demographics:
#1. Latinos. Bush got 60%. McCain 40%. Romney 20%. Latinos in the U.S. aren't just near the Mexico border anymore. They can be found in many states.
#2. Women. Because of his abortion stance and "binders full of women".
#2.1 White men. Because he flip flopped on issues and confused moderate and conservative-libertarian men... see below... Many went to Obama, some sucked it up and went with Gary Johnson (Libertarian).
Popular Vote (as of Nov 09, 2012):61,212,519 Obama (Dem.)
58,200,628 Romney (GOP)
1,148,187 Johnson (Lib.)
What do the Republicans need to do to win next time?
They should give Stephen Harper a call to see how it's done.