According to the Catechism of the Catholic Church an indulgence is...
"a remission before God of the temporal punishment due to sins whose guilt has already been forgiven, which the faithful Christian who is duly disposed gains under certain prescribed conditions through the action of the Church which, as the minister or redemption, dispenses and applies with authority the treasury of the satisfactions of Christ and the saints."(CCC 1471)
Most people believe that the use of indulgences ended after the Protestant Reformation and the Counter Reformation. However this is quite untrue. While the buying and selling of indulgences (which is immoral and against Catholic teaching) ended, indulgences in their pure form are still a part of the faith.
There are two different types of indulgences, plenary and partial. Plenary indulgences remove all temporal punishment due to our sins. Temporal punishment is the time people serve in purgatory. In order to recieve a plenary indulgence, you must be in a state of grace, having no sin on your soul. To have that you must either go to confession or say a perfect contrition. Partial indulgences are what they sound like. They remove some of the temporal punishment. To recieve these, you do not need to be in a state of grace, however, it is recommended that you are.
There are many different types of indulgences(all free). Some are prayers you can say. The Divine Mercy Chaplet is an example of this, it is a partial indulgence. Others are actions, such as going to a priest's 30th or 50th anniversary mass. That is a plenary indulgence. Indulgences are supposed to show that you are truely sorry for your sins, and you are doing good in the world to counteract the harm you did it when you sinned. You can do an indulgence for anyone, living or dead. It does not necessarily have to be yourself.
The reason why people do not know about indulgences today is quite obvious. Its history has not been the cleanest. The Catholic Church downplays this aspect of its teachings. There are many Catholics who have no clue they still exist. It is still quite a controversial subject.
Catechism of the Catholic Church, 1994
Our Sunday Visitor's Catholic Encyclopedia 1991