Piece values
Pawn 1, knight 3, bishop 3, rook 5, queen 9. Each side starts with 39 points of material.
In this lesson
To know whether a trade is good, count: pawn 1, knight 3, bishop 3, rook 5, queen 9. The king has no price, because he can never be traded. With those numbers you see at once that giving a rook for a knight loses two points.
They aren't fixed laws: an active piece is worth more than a trapped one, and an attack on the king can be worth more than all the material. But while you're learning, counting is your best guide.