History of American Political Parties
In "The Custom House," the foreword-like part of The Scarlet Letter, Hawthorne deals with political parties at the time. Democrats and Republicans in their current form only arose after the Southern Dixiecrats merged into the New Conservatives after the 1950s.

If you are not sure about who the Whigs are, what a Locofoco is, or about any of the other terms in the text, make sure to check out this graph, visualizing the development of the American political parties:

http://www.perno.com/history/parties/parties.htm

Do NOT mistake them for the modern parties. In fact, Licoln, the father of Abolition, was a Republican, and today's party names are very roughly an inversion of the nomenclature of the 19th century.

Whigs:

"The Whig party (1834-56) of the United States was formed to oppose Andrew Jackson and the Democratic party. The Whig coalition's antecedent was the National Republican party organized to support President John Quincy Adams (1825-29).

Led by Henry Clay of Kentucky and Daniel Webster of Massachusetts, National Republicans advocated an active federal role in the nation's economic development. Known as the American System, their program called for federally sponsored roads and canals, a high tariff to protect American manufacturers, a powerful national bank, and a go-slow policy on the sale and settlement of public lands.

The leaders and the program proved no match against the popularity of Jackson. He defeated Adams in 1828, rejected federal aid for roads in 1830, vetoed the recharter of a National Bank in 1832, and later that year decisively won reelection against Clay. The repeated defeats led to the formation in 1834 of a new opposition party, initially united on little but hostility to Jackson's bold use of executive power. Joining the economic nationalists in the party were several state-rights southerners, including for a time John C. Calhoun of South Carolina.

The opponents of "King Andrew" took their name from the American Whigs of 1776 and earlier English Whigs who had opposed the power of the British crown.

The wide diversity of views within the Whig party made it difficult to unify around a common program or leader. In the 1836 presidential contest, therefore, the Whigs backed three regional candidates, Gen. William Henry Harrison, Hugh Lawson White, and Webster, all of whom lost to Jackson's successor, Martin Van Buren. In 1840 the Whigs backed a single candidate, Harrison, who, like Jackson, was a military hero. The Whigs campaigned to victory through slogan and song, parading Harrison as a humble "log cabin" candidate who wore homespun and drank common hard cider.

As president, Harrison was prepared to let Clay seek congressional passage of an energetic Whig program that included a new tariff and national bank. But Harrison died in April 1841, and his successor, former state-rights Democrat John Tyler of Virginia, vetoed the Whig program and was expelled from the party. The Whigs nominated Clay for president in 1844. The Democrats made the "reannexation of Texas" the campaign's major issue, thereby reviving the dangerous controversy over the extension of slavery. The Whigs, more sharply divided than the Democrats over this matter, suffered a narrow defeat.

Ultimately the slavery issue destroyed the Whigs. In 1848 they won the presidency with another military hero, Gen. Zachary Taylor. Whig Senate leaders Clay and Webster, however, fearing disunion over slavery, played key roles in securing the Compromise of 1850, which include a stronger Fugitive Slave Law that offended many northern Whigs. In 1852 many southern Whigs defected in reaction to the party's nomination of Gen. Winfield Scott for president and the deaths of Unionists Clay and Webster. Furious sectional controversy over the Kansas-Nebraska Act dealt the final blow. The bulk of the party's remaining members dispersed in 1856 to the nativist Know-Nothing party or to the rising Republican party."

Democrats:

"Democratic Party, one of the two main political parties of the United States. Its origins can be traced to the coalition formed behind Thomas Jefferson in the 1790s to resist the policies of George Washington's administration. This coalition, originally called the Republican, and later the Democratic-Republican party, split into two factions during the presidential campaign of 1828. One, the National Republican party, was absorbed into the Whig party in 1834; the other became the Democratic party.

The Jacksonian Party

In the 1830s, under presidents Andrew Jackson and Martin Van Buren, the Democratic party developed the characteristics it retained until the end of the century. It was willing to use national power in foreign affairs when American interests were threatened, but in economic and social policy it stressed the responsibility of government to act cautiously, if at all. Democrats argued that the national government should do nothing the states could do for themselves, and the states nothing that localities could do.

The party's supporters in this period included groups as diverse as southern plantation owners and immigrant workers in northern cities. They all had in common a dislike of government intervention in their lives. The Democrats' opponents, the Whigs, on the other hand, believed in using governmental power to promote, regulate, correct, and reform."