When a male child, who is not a priest or a Levite, is naturally born of his mothers first pregnancy to a mother not descended of Cohanim (Priests) or Levites he must be "redeemed" with the value of five biblical shekels, to be payed to a Cohen (Priest).
- This Mitzvah is based on the pasuk בְּכוֹר בָּנֶיךָ תִּתֶּן לִּי "the firstborn of your sons you shall give Me" and וְכֹל בְּכוֹר אָדָם בְּבָנֶיךָ תִּפְדֶּה "and every firstborn of man among your sons, you shall redeem" . It is considered a Biblical positive commandment. 
- The principle obligation of this law falls on the father. If the father fails to fulfill his obligation, the obligation is transferred to the son to redeem himself when he becomes the age of Bar Mitzvah (13 years old). 
- The mother has no obligation to redeem her son. 
- An orphaned firstborn, according to most authorities should redeem himself when he reaches the age of Bar Mitzvah.  However, some authorities hold that Bet Din should redeem him as a child by gifting to him the coins. Lastly, some authorities hold that the Bet Din should redeem the child (on condition that it should be effective if the child doesn’t do it himself later on) when he’s still a child and then when the child grows up he should redeem himself and both should be done without a Bracha. 
- Shemot 22:28
- Shemot 13:13
- Rambam Sefer HaMitzvot (Aseh #80), S"A Y"D 305:1
- S"A YD 305:15 writes that if the father doesn't redeem his son then the son is obligated to redeem himself when he grows up. The Pitchei Teshuva YD 305:25 quotes the Zichron Yosef who explains that the child should wait until he's the age of Bar Mitzvah so that he is obligated in the Mitzvah himself because as a child he's not obligated in the mitzvah and there's no even Chinuch for it because it's a one time mitzvah.
- S"A YD 305:2
- Maharil (Minhagim, Hilchot Pidyon HaBen #5) quotes the Mahari Segal who holds that an orphaned firstborn should do his own redemption when he grows up. This is also quoted in the Or Zaruha (vol 1, Bechorot, Siman 514). This is codified by the Rama YD 305:10 quoting the Sh”t Rivash 131. Many achronim agree including the Levush 305:9, Taz 305:11, Maadenei Melech (pg 266, quoted by Shach 305:11), Sh”t Yeriyot HaOhel 15 (quoted by Pitchei Teshuva YD 305:16), Sh”t Chemdat Shlomo YD 31-2, Kesot HaChoshen 243:17, Atzei Levonah 305, Sh”t Nachalat Yacov 4, Sh”t Tzemach Tedek 3:222, Zochrenu LeChaim YD (Peh pg 209b), Sh”T Mahaneh Chaim EH 3:75, Sh”t Meshivat Nefesh 2:40, Sh”t Tiferet Yosef YD 31, Pri Adama (vol 1, pg 139d) in name of the rabbis of Yerushalyim, Sh”t Maaseh Avraham 52, Yafeh LeLev YD 305:4, Sh”t Bet Meir 18, Sh”T Beni Binyamin 5, Sh”t Har Tzvi 242, Sh”t Yabea Omer OC 3:27, YD 8:31, Yalkut Yosef (305:13), Ben Ish Chai in Rav Brachot (81:1). [I didn’t get a chance to look up these sources but found them quoted in Sefer Otzer Pidyon HaBen (pg 217-9).]
- Tzedah LaDerech (Parshat Bo) in name of Maharal of Prague, Shach 305:20, Biur HaGra 305:15, Teshuvat Hagoan Melisa 22, Aruch Hashulchan 305:11, Ikrei HaDaat 33:4, Toafot Raam YD 45, Pidyon Nefesh 4:6, Daat Kedoshim 305:14, Sh”t Maharam Shik 300, Shaarei Tzedek 179, Sh”t Meshiv Dvar 87, Sh”t Tiferet Tzvi 42, Sh”t Dvar Moshe 75, Sh”t Avnei Nezer YD 396, SH”t Arugat HaBosem YD 240, Avnei Zichron 2:97, Degel Reuven 3:17, Orach Yosher YD 27, Yad David (Kiddushin 53b in the note), Maaseh Avraham 52, Sh”t Tov Taam VeDaat 2:125, Shevet Menashe 130, Mirei Kohen 1:36, Sh”t Tirosh VeYitzhar 129, Yad Yitzchak 1:25, Bar Livay YD 23-4, VaYan Avraham YD 4, and Gur Aryeh Yehuda 117. [I didn’t get a chance to look up these sources but found them quoted in Sefer Otzer Pidyon HaBen (pg 219-220).] There’s actually another two options brought by the poskim that some say that the child should redeem himself even before he grows up and some say that the grandfather should redeem the child. For a discussion of who holds these opinions and who argues see Otzer Pidyon HaBen (pg 220-1).
- Otzer Pidyon HaBen (pg 222), Sh”t Chatom Sofer 295, Sh”t Arugat HaBosem 240, Sh”t Pani Mabin 226, Sh”t Shevet Sofer 98, Sh”t Tov Taam VeDaat 2:125, and Mishneh Halachot YD 231.