Pidyon Ha'Ben, the "redemption of the first born son," takes place when a baby is at least 31 days old, and involves "buying him back from a Kohen." (see Numbers 18:15)
In actual practice, there are various exemptions which mean that many families do not require a Pidyon Ha'Ben.
The background for this mitzvah is somewhat complex, but here goes:
Originally, God intended for the first-born of each Jewish family to be a Kohen – i.e. that family's representative to the Holy Temple. (Exodus 13:1-2, Exodus 24:5 with Rashi)
God decreed that all the Kohanim would come from the tribe of Levi.
But then came the incident of the Golden Calf. When Moses came down from Mount Sinai and smashed the tablets, he issued everyone an ultimatum: "Make your choice – either God or the idol" (Exodus 32:26). Only the tribe of Levi came to the side of God. At that point, God decreed that each family's first-born would forfeit their "Kohen" status – and henceforth all the Kohanim would come from the tribe of Levi. (Numbers 3:11-12)
Which brings us to the mitzvah of Pidyon Ha'Ben. Since the first-born child is technically a "Kohen" whose potential cannot be actualized, he has to be replaced (so to speak) by a Kohen from the tribe of Levi. This is accomplished by the father of the baby offering the Kohen a redemptive value of five silver coins for the boy.
A deeper reason we perform this mitzvah is to remind us of the Exodus from Egypt, when God killed the Egyptian first born, yet spared the Jewish first born. Also, since a person loves his first born so much, it is a fitting time to re-acknowledge the fact that everything we own in fact belongs to God. (Numbers 3:13)
Who Does Pidyon Ha'Ben?
There are many factors that determine when and if to perform Pidyon Ha'Ben, so you will need to find a rabbi who is well versed in Jewish law to guide you.
In general, Pidyon Ha'Ben only applies to a son who "opened his mother's womb." Therefore, all the following conditions must apply:
1) The mother is Jewish, and she has never had a baby before, male or female.
2) The baby was delivered in the normal way, not via C-section.
3) The mother did not have an abortion prior to this birth. (If the mother had a prior miscarriage, it is best to consult with a rabbi; certainly if it occurred within the first 40 days of pregnancy, the child that follows would require Pidyon Ha'Ben.)
4) The father of the baby is not a Kohen or a Levi, and the mother's father is not a Kohen or a Levi.
5) Since the mitzvah applies to any son who "opens his mother's womb," a Pidyon Ha'Ben could also be required in the event of a father's second marriage.
Note that if a child is exempt, there is no difference in his status. Even if a Pidyon HaBen is required but has not been done, the child's "status" is unaffected – though the father and the child have a continuing obligation to do it.
Pidyon Ha'Ben "How-To"
If the above conditions apply, here is the Pidyon Ha'Ben procedure:
1) Find a Kohen with a very strong tradition in his family that he is indeed a Kohen.
2) Get five silver coins, containing approximately 110 grams of silver. Five U.S. silver dollars are often used, though the specific type of coins depends on where you are in the world. (One should use coins with the silver content of at least 5 of the traditional 90%-silver content US silver dollars. That could be five Israeli Pidyon HaBen coins, or US Silver Eagles which are .9999 pure silver.)
3) The Pidyon Ha'Ben ceremony is held when the baby is 31 days old. If the 31st day is Shabbat, the ceremony is held after Shabbat.
4) The ceremony is held in the context of a festive meal. To show love for the mitzvah, the baby is usually brought in on a silver tray decorated with jewelry.
The Kohen says: Either give your first-born or redeem him.
5) The actual ceremony is as follows: The father attests to the fact that this is indeed his first-born son. The Kohen then asks the father: "Which do you prefer, to give me your first born or to redeem him?" (It is really a rhetorical question, because the Torah requires the father to redeem the son.)
The father then says the following two blessings:
(1) Baruch ata Adonoy, Elo-heinu Melech ha'olam, asher kid'shanu bi'mitzvo-sav, vi'tzivanu al Pidyon ha'ben.
Blessed are You, Lord our God, King of the Universe, Who sanctified us with His mitzvot, and instructed us regarding the redemption of a son.
(2) Baruch ata Adonoy, Elo-heinu Melech ha'olam, Sheh-he-che-yanu vi-kee-yimanu Vi-hee-gee-yanu laz-man ha-zeh.
Blessed are You, Lord our God, King of the Universe, Who has kept us alive, sustained us, and brought us to this season.
The father then gives the coins to the Kohen, who blesses the child, and recites a blessing over a cup of wine. The full text of the ceremony is printed in the siddur.
If your baby does not meet the conditions for having a Pidyon Ha'Ben, don't be concerned – there is no defect in his status. In fact, only about 1-of-10 families ever meet all the conditions for Pidyon Ha'Ben.
Since the matter is fairly complex, it is recommended to consult with a rabbi or a kohen who is himself knowledgeable about Pidyon HaBen.
If someone was supposed to have a Pidyon Ha'Ben as a child, but never did (i.e. their parents neglected to do so), then the obligation is on the person to take care of it himself. In such a case, one should contact a rabbi ASAP to arrange the ceremony.