Since this is a history class, I'll quote from a history book, John Vidmar's The Catholic Church Through the Ages:
Note: the indulgence does not forgive the sin. The indulgence reduces the temporal punishment for sin. The Church, through the power of binding and loosing granted by Christ to the apostles and recounted in the Bible, has the authority to grant indulgences. It is not necessary to donate money to the Church in order to get an indulgence.Finally and most famously, there was the sale of indulgences. An indulgence is the remision of the temporal punishment due to a forgiven sin, granted by the church, and effective before God. With each act of confession and absolution, a penance was (and is) attached which requires the penitent to make some sort of "atonement" for his sins. In the early church and right up to the late Middle Ages, these penances could be physical and public: e.g., standing outside a church each Sunday for a number of weeks or years, having certain privileges and rights revoked, going on pilgrimage (to local shrines for lesser sins, or distant and more prestigious shrines for greater sins). Increasingly, as these penances disappeared, the notion of getting souls out of purgatory gained ground. And this could be done by donating money to charity and for Masses to be said on behalf of the deceased. Chantry chapels appeared, at which priests did nothing more than say Masses all day for various intentions. One papal official wrote: "The Lord desireth not the death of a sinner, but rather that he should pay and live."Some preachers used indulgences as part of their act. The most notorious of these preachers was the German Dominican Johannes Tetzel. Most bishops in Germany did not permit him to come into their dioceses, such was his reputation for an almost circus-like performance. But Albrecht and the diocese of Mainz were out of money, and so Tetzel was invited to preach a new indulgence - for the building of the new St. Peter's in Rome on the condition that half the money went to the diocese of Mainz. This drove Luther over the edge.