Avodas Kochavim 2:9
It doesn’t matter if a blasphemer immediately retracts his statement. Once he blasphemes in the presence of witnesses, he is liable to the penalty of death by stoning. If someone curses God using the name of an idol, a zealous person may execute him. If the offender is brought to court, he is not liable to death by stoning; only one who curses God using another of His names is liable to stoning.
Avodas Kochavim 2:10
Whoever hears God’s name blasphemed is required to tear his garments, even if he hears someone blaspheme a term used to describe God. This is when one hears a Jew blaspheme. In such a case, both one who heard the actual blasphemy and one who hears it related by the witnesses must tear their garments. If one hears a non-Jew blaspheme, he need not tear his garments. Elyakim and Shevna tore their clothes (in Isaiah chapter 36) because Ravshakeh (who blasphemed) was an apostate Jew. The witnesses and the judges place their hands on the convicted blasphemer’s head and say, “You are responsible for your death; you brought this on yourself.” This is only done for a blasphemer, not for anyone else executed by the courts, as per Leviticus 24:14, “All who hear shall place their hands on his head.”