MISHNA: And these are the transgressors who are killed by decapitation in the implementation of the court-imposed death penalty: The murderer; and the residents of an idolatrous city, all of whom engaged in idol worship. The mishna elaborates: In the case of a murderer who struck another with a stone or with iron, or held him in the water or in the fire, and the victim could not extricate himself from there and he died, the murderer is liable to be executed.
12 pages later on Sanhendrin 76b (https://www.sefaria.org/Sanhedrin.76b.9?lang=bi&with=Navigation&lang2=en):