If a man steals an ox, a sheep or a goat… (Exodus 21:37)
The Torah tells us that if a person steals an animal of domestic livestock, which he then slaughters or sells, he must repay four- or fivefold. The thief pays four times the value of a sheep and five times the value of an ox. The gemara offers two reasons for the difference in penalties. Rabbi Meir suggests that the thief is punished more harshly for the theft of the ox because he deprives the owner of the labor it could have done. Rabbi Yochanan ben Zakkai says that the thief of a sheep had to carry it on his shoulders and the penalty is lighter as a concession for the blow to his dignity that the thief has already suffered.
There are more details. Exodus 22:3 continues that if the animal turns up alive in the thief’s possession, the penalty is merely double. (This is the fine in the case of other stolen objects, as well.) A thief breaking in may be killed in self-defense (22:1) and if he cannot pay his fine, the thief is sold to work off the debt (22:2). The Talmud discusses a good number of other scenarios, from the stolen property appreciating or depreciating in value to violating Shabbos in the course of a robbery.
This mitzvah only applies to the courts in the time of fully-ordained judges. Nowadays, a beis din is only empowered to return the stolen object or its value, but not to impose the penalties. (Even when we have ordained courts, the impoverished thief is only sold to pay off his debt at a time when the Jubilee year is observed because that’s the only time the laws of slaves are in effect.)
This mitzvah is discussed quite a few places in the Talmud: notably, in the seventh chapter of Baba Kama and the eighth chapter of Sanhedrin, but also in Baba Metzia and elsewhere. In the Shulchan Aruch, it is found in Choshen Mishpat starting in 348. It is #239 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos.