The three-fifths compromise was an agreement between Southern and Northern states reached during the Constitutional Convention of 1787 in Philadelphia, during which the basic framework of the United States was established. Under this compromise, only three-fifths of the slave population was counted for the purpose of taxation and representation in Congress. Counting slaves as part of the population rather than as property would give the Southern states more political clout.
As all compromises do, the three-fifths compromise started as a dispute. Most of the Northern states did not want to count slaves at all, arguing that they should be treated as property, since they didn't have votes or any other power. The Southern states, however, wanted to count slaves as people so that they would get more representation in Congress, solidifying their political power. The North resisted this, fearing that counting slaves in this way would increase the Congressional seats apportioned to the South, thereby making the South extremely formidable.
In the end, two representatives, James Wilson and Roger Sherman, came up with the three-fifths compromise, which was designed to meet the demands of both sides. Recognizing the desire of the South and wanting to reach out to the Southern states to encourage them to ratify, the three-fifths compromise allowed the government to count part of the slave population, while allaying the fears of the North about Southern power.
Of course, many people in the Northern states kept slaves as well, but the vast majority of slaves in America at the time were working on Southern plantations as agricultural laborers. Under the three-fifths compromise, plantation owners in the South gained considerable political power, which they used to promote their own political agenda and desires.
The language of the Constitution avoided using the term "slaves," with the relevant text reading: "...shall be determined by adding to the whole Number of free Persons, including those bound to Service for a Term of Years, and excluding Indians not taxed, three fifths of all other persons." Some people have suggested that the "all other persons" language indicated that the framers of the Constitution opposed slavery, and that they wished to establish a document which would be flexible in the event that slavery was abolished. It is more likely, however, that the language was designed to give wiggle-room so that others in addition to slaves could be counted under this definition, given that slavery was widespread and commonly accepted by the Founders.