An inevitable part of the game of chess is the loss of pieces -- even if you don't make any mistakes that allow your opponent to capture pieces, you'll likely sacrifice some as part of larger tactics. You can't directly recover a captured piece, but you can "promote" the weakest piece in the game -- the pawn -- and turn it into any other piece of your choosing, except the king. In this way you can replace any captured piece.
Advance a pawn to the opposite end of the board. The pawn must reach the back row of squares -- the one on which your opponent placed his king and queen -- unharmed.
Select any piece besides the king to which to promote the pawn. You can replace any piece you have lost using this method, although players usually choose either the queen or the knight because between them they can perform the functions of any of the other pieces.
Remove the pawn from the board and replace it with the piece your opponent captured. You can promote a pawn even if no such pieces were captured -- just use a paper marker, a coin or a piece from another set to represent the new piece.