During the establishment of the United States from 1776 to 1789, there were no Democrats and Republicans as we currently understand them. There were Federalists and anti-Federalists, the latter later forming the nucleus of the Democratic-Republicans. Well-known Federalists included John Adams and Alexander Hamilton. Federalists believed in a strong, centralized government with infrastructural services, such as a national bank. Federalists were often urban types—Adams was from Boston and Hamilton was from New York—and they were less likely to be sympathetic to the needs of slave owners.
Thomas Jefferson and James Madison are the most well-known Democratic-Republicans. Members of this party were more agrarian and more likely to be slave owners. They came from less populous states and states, such as Virginia and South Carolina, that often had large populations of black slaves. This situation inspired the "three-fifths compromise" in the Constitution, which declared slaves three-fifths of a person so that the Democratic-Republicans could have better representation in Congress. Both Jefferson and Madison were wealthy Virginia planters.
Democratic-Republicans believed in a less centralized government and supported allowing states more power. Jefferson and other members of this party believed that the citizens of an individual state were best positioned to determine their needs and did not need a distant government, then in Philadelphia, to direct their functioning. Democratic-Republicans were averse to involving themselves in foreign affairs, but the demands of the period, including the Louisiana Purchase in 1803, forced them to become more internationally engaged.
The Whig Party was active from 1834-1854. They developed in opposition to Andrew Jackson, whose populist appeal led to what Whigs perceived as an overreach of presidential powers. They borrowed the term "Whig" from British parliamentarians who opposed extensive royal power. The Whigs were usually antislavery, but they expressed a willingness to compromise—a political instinct best expressed by the party's founder, Kentucky Senator Henry Clay, who was nicknamed The Great Compromiser due to his ability to secure sectional compromises, particularly during the Missouri Compromise of 1850. Whigs were sympathetic to sectarian interests, like the Democratic-Republicans before them, but less sympathetic to slavery.
The Whig Party died in the 1850s and was absorbed by the Republican Party. The Whigs' key figures, Clay and Daniel Webster—who represented New Hampshire and Massachusetts in Congress—died. The party subsequently split between its proslavery and antislavery wings. The former joined the Republicans, who dominated in the Northern states; the latter went to the Democrats, who dominated in the South.
The Republicans were, at that time, against slavery. The Democrats, at that time, were for slavery. Democrats were adamant in their support of states' rights—a lingering Constitutional argument that they used to justify their right to have slaves and the perceived right of newly admitted states to decide for themselves if they wished to have slavery.