The following definition of an indulgence, which is used in canon 992 of the Code of Canon Law and in paragraph 1471 of the Catechism of the Catholic Church, was given by Bl. Pope Paul VI in his 1967 apostolic constitution, Indulgentiarum Doctrina:
An indulgence is the remission before God of the temporal punishment due sins already forgiven as far as their guilt is concerned, which the follower of Christ with the proper dispositions and under certain determined conditions acquires through the intervention of the Church which, as minister of the Redemption, authoritatively dispenses and applies the treasury of the satisfaction won by Christ and the saints.
A person may apply the indulgence he obtains to himself or offer it for a departed soul. Soliciting the Church's intervention on behalf of the dead was practiced by faithful Jews, as 2 Maccabees 12:43-46 shows: "And making a gathering, he sent twelve thousand drachms of silver to Jerusalem for sacrifice to be offered for the sins of the dead. ... It is therefore a holy and wholesome thought to pray for the dead, that they may be loosed from sins."
An indulgence can be obtained only by a Catholic in a state of grace, who performs a work that's indulgenced by the Church with the intention of gaining that indulgence. Besides being detached from all mortal and venial sins, the person must also receive Holy Communion, go to confession and pray for the pope's intentions. Unless legitimately impeded, these conditions must be fulfilled within 20 days before or after doing the indulgenced work.
A plenary indulgence remits all the temporal punishment due to one's sins. A partial indulgence is "an equal remission of punishment through the intervention of the Church" that is "in addition to the remission of temporal punishment acquired by the action itself." A current list of indulgenced works is in the Enchiridion of Indulgences.
Discover God's mercy shown by indulgences in season three of Church Militant's Premium show The One True Faith—Indulgences.