There was a major shift in the 1960s when the Democrats embraced equal rights/civil rights for black men (and later on, for women), causing much of the (white) Southerners to shift to the Republicans (which waited longer to accept desegregation).
Democrats, 1960s-2000, were proponents of expanded governmental power, US intervention in foreign states, etc, and Republicans were opposed to these things.
Post 9/11, President Bush, a republican, started pushing for expanded government power (such as the Patriot Act) and US intervention in the Middle East (the war on terror). Democrats switched around by 2003 and opposed these things.
Once President Obama entered office, he reverted the Democrats to expanding governmental power and intervention in other countries (Libya, more troops to Afghanistan), and the Republicans reverted to opposing these things.
In general, it seems that the party in power wants to expand their power while in office, and the party out of power wants to limit it.