The ox must be stoned; its flesh may not be eaten (Exodus 21:28)
If an ox kills a person, it must stoned, even if was a “first offender.” No benefit may be derived from the condemned animal. Once judgment has been passed, even if the ox is ritually slaughtered, it may not be eaten. As with the previous mitzvah, this law does not apply exclusively to oxen, the Torah is just giving us a common situation as an example.
These cases were judged by the beis din of 23 judges. (This is opposed to a three-person beis din used for civil matters and the 71-person Sanhedrin. See the mishnayos in the first chapter of Sanhedrin for a description of the court system.) There are situations in which an animal would not be liable for killing a person. For example, if an ox was scratching itself on a wall and the wall collapsed, killing a person, the ox would be exempt. See Talmud Baba Kama 44b for other situations in which the ox would go free.
The reason for this mitzvah is that what the ox or other animal did is huge. An animal is not a sentient being and it didn’t act with malice aforethought, but a person died and we have to treat that seriously. It would be too cavalier to eat such an animal. Rather, we should focus on improving our deeds and being careful to avoid such tragedies in the future.
This prohibition applies to both men and women, but only regarding animals condemned by a duly-ordained beis din, which limits the observance of this mitzvah to Temple times. In the Talmud, it is discussed in Baba Kama, pages 41a-b, as well as in Kiddushin (56b) and Pesachim (22b). It is codified in the Mishneh Torah in the fourth chapter of Hilchos Maacholos Asuros (“forbidden foods,” as opposed to the previous mitzvah which is categorized under damages). It is #188 of the 365 negative mitzvos as listed in the Rambam’s Sefer HaMitzvos.