In Mishneh Torah, Rotzeach uShmirat Nefesh 4:10, there is a halacha which is clearly (and thankfully) not practiced, at least as it relates to the surface reading of the halacha:
הָאֶפִּיקוֹרְסִים וְהֵם עוֹבְדֵי עֲבוֹדָה זָרָה אוֹ הָעוֹשֶׂה עֲבֵרוֹת לְהַכְעִיס אֲפִלּוּ אָכַל נְבֵלָה אוֹ לָבַשׁ שַׁעַטְנֵז לְהַכְעִיס הֲרֵי זֶה אֶפִּיקוֹרוֹס וְשֶׁכּוֹפְרִין בַּתּוֹרָה וּבַנְּבוּאָה הָיָה מִצְוָה לְהָרְגָן. אִם יֵשׁ בְּיָדוֹ כֹּחַ לְהָרְגָן בְּסַיִף בְּפַרְהֶסְיָא הוֹרֵג. וְאִם לָאו הָיָה בָּא עֲלֵיהֶן בַּעֲלִילוֹת עַד שֶׁיְּסַבֵּב הֲרִיגָתָן. כֵּיצַד. רָאָה אֶחָד מֵהֶן שֶׁנָּפַל לִבְאֵר וְהַסֻּלָּם בַּבְּאֵר. הָיָה מְסַלְּקוֹ וְאוֹמֵר הֲרֵינִי טָרוּד לְהוֹרִיד בְּנִי מִן הַגַּג וְאַחֲזִירֶנּוּ לְךָ וְכַיּוֹצֵא בִּדְבָרִים אֵלּוּ:
It is a mitzvah to kill minim and apikorsim*. The term minim refers to Jewish idolaters or those who perform transgressions for the sake of angering God, even if one eats non-kosher meat for the sake of angering God or wears sha'atnez for the sake of angering God. The term apikorsim refers to Jews who deny the Torah and the concept of prophecy. If there is the possibility, one should kill them with a sword in public view. If that is not possible, one should develop a plan so that one can cause their deaths. What is implied? If one sees such a person descend to a cistern, and there is a ladder in the cistern, one should take the ladder, and excuse oneself, saying: "I must hurry to take my son down from the roof. I shall return the ladder to you soon." Similarly, one should devise other analogous plans to cause the death of such people.
In plain terms, it would seem that the Rambam is saying that it is a commandment, if a person is able, to kill a person with a sword, or if not to at least try to devise a plan to cause them to die, on the basis of whether they deny the divinity of the Torah and prophecy.
Needless to say, there are many Jews who do not believe in this. And not just the tinok shenishba but there are many who were raised with these beliefs and for intellectual reasons concluded that they disbelieve in the divinity of the Torah and prophecy, sometimes even outspoken about this.
The same halacha is brought down in other places, for example in Shulchan Aruch Yoreh De’ah 158:
הַמִּינִים, וְהֵם שֶׁעוֹבְדִים לַעֲבוֹדַת כּוֹכָבִים, אוֹ הָעוֹשֶׂה עֲבֵרוֹת לְהַכְעִיס, אֲפִלּוּ אָכַל נְבֵלוֹת אוֹ לָבַשׁ שַׁעַטְנֵז לְהַכְעִיס הֲרֵי זֶה מִין; וְהָאֶפִּיקוֹרְסִים, וְהֵם שֶׁכּוֹפְרִים בַּתּוֹרָה וּבִנְבוּאָה מִיִּשְׂרָאֵל, מִצְוָה לְהָרְגָם. אִם יֵשׁ בְּיָדוֹ כֹּחַ לְהָרְגָם בְּסַיִף, בְּפַרְהֶסְיָא, הוֹרְגוֹ. וְאִם לָאו, יָבֹא בַּעֲלִילוֹת עַד שֶׁיְּסַבֵּב הֲרִיגָתוֹ. כֵּיצַד, רָאָה אֶחָד מֵהֶם שֶׁנָּפַל לִבְאֵר וְהַסֻלָּם בַּבְּאֵר, קוֹדֵם וּמְסַלְּקוֹ וְאוֹמֵר: הֲרֵינִי טָרוּד לְהוֹרִיד בְּנִי מִן הַגַּג וְאַחְזִירֶנּוּ לְךָ, וְכַיּוֹצֵא בִּדְבָרִים אֵלּוּ. הַגָּה: וְעַיֵּן בְּחוֹשֶׁן הַמִּשְׁפָּט סִימָן תכ''ה. מְשֻׁמָּדִים שֶׁמְּשַׁמְּדִים עַצְמָם וּמְטַמְּעִים עַצְמָם בֵּין הַגּוֹיִים לַעֲבֹד עֲבוֹדָה זָרָה כְּמוֹתָם, הֲרֵי הֵם כְּמוֹ מוּמָרִים לְהַכְעִיס וּמוֹרִידִין וְלֹא מַעֲלִין. (אוֹתָם) (תּוֹסָפוֹת פא''מ). וּמִכָּל מָקוֹם אִם בָּא לָשׁוּב, לֹא הֶחֱמִירוּ עָלָיו, שֶׁקָּשֶׁה לִפְרֹשׁ מֵהֶם וְחַיְשִׁינָן שֶׁלֹּא יַחֲזֹר לְסוּרוֹ. (ת''ה סִימָן קצ''ח).
The heretics, and those who practice idol worship (literally: worship of the stars), or who do sins for the sake of provocation, even one who ate forbidden foods or wore shatnez in order to provoke, this person is a heretic; and the apikorsim, and those who do not believe in the Torah and in the Jewish prophecy, it is a mitzvah to kill them. If one has strength in his hand to kill them with a sword, in public, he should kill him. Etc.
I could not find where the commentaries on those disagree either.
The law would appear clear on who it's referring to, and it also appears clear to be referring to individual action and not an act of a court.
And yet, I have never heard a rabbi practically advise a person to kill a heritic. So, how do we understand the halacha? The possibilities I can conceive of are:
a) Rambam's (et al) opinion is indeed that we should kill such heretics, but not in our day (such as because a court is involved in some regard; alternatively, because there is no country in which this halacha could be legally followed). (If this is the case, where is this brought down, and when/under what circumstances would it be applicable?)
b) Rambam's (et al) opinion is indeed that we should kill such heretics, but we do not follow his opinion. (If this is the case, where is it discussed why we do not follow his opinion?)
c) Rambam's (et al) opinion is that we should not kill such heretics, but rather there are other criterion (like where they actually pose a risk to life, though that would seem to be redundant as that's already covered by other laws). (If this is the case, where is it explained what he means and why he writes this halacha to appear as if he says this?)
What is the explanation for such a radical-sounding law, and if it is not a practical halacha, where is it explained for the proper understanding of how it's viewed?
*As an elaboration on who qualifies as an apikores, Hilchos Teshuva 3:7-8 says:
חֲמִשָּׁה הֵן הַנִּקְרָאִים מִינִים. הָאוֹמֵר שֶׁאֵין שָׁם אֱלוֹהַּ וְאֵין לָעוֹלָם מַנְהִיג. וְהָאוֹמֵר שֶׁיֵּשׁ שָׁם מַנְהִיג אֲבָל הֵן שְׁנַיִם אוֹ יוֹתֵר. וְהָאוֹמֵר שֶׁיֵּשׁ שָׁם רִבּוֹן אֶחָד אֲבָל שֶׁהוּא גּוּף וּבַעַל תְּמוּנָה. וְכֵן הָאוֹמֵר שֶׁאֵינוֹ לְבַדּוֹ הָרִאשׁוֹן וְצוּר לַכּל. וְכֵן הָעוֹבֵד כּוֹכָב אוֹ מַזָּל וְזוּלָתוֹ כְּדֵי לִהְיוֹת מֵלִיץ בֵּינוֹ וּבֵין רִבּוֹן הָעוֹלָמִים. כָּל אֶחָד מֵחֲמִשָּׁה אֵלּוּ הוּא מִין:
שְׁלֹשָׁה הֵן הַנִּקְרָאִים אֶפִּיקוֹרְסִין. הָאוֹמֵר שֶׁאֵין שָׁם נְבוּאָה כְּלָל וְאֵין שָׁם מַדָּע שֶׁמַּגִּיעַ מֵהַבּוֹרֵא לְלֵב בְּנֵי הָאָדָם. וְהַמַּכְחִישׁ נְבוּאָתוֹ שֶׁל משֶׁה רַבֵּנוּ. וְהָאוֹמֵר שֶׁאֵין הַבּוֹרֵא יוֹדֵעַ מַעֲשֵׂה בְּנֵי הָאָדָם. כָּל אֶחָד מִשְּׁלֹשָׁה אֵלּוּ הֵן אֶפִּיקוֹרוֹסִים. שְׁלֹשָׁה הֵן הַכּוֹפְרִים בַּתּוֹרָה. הָאוֹמֵר שֶׁאֵין הַתּוֹרָה מֵעִם ה' אֲפִלּוּ פָּסוּק אֶחָד אֲפִלּוּ תֵּבָה אַחַת אִם אָמַר משֶׁה אֲמָרוֹ מִפִּי עַצְמוֹ הֲרֵי זֶה כּוֹפֵר בַּתּוֹרָה. וְכֵן הַכּוֹפֵר בְּפֵרוּשָׁהּ וְהוּא תּוֹרָה שֶׁבְּעַל פֶּה וְהַמַּכְחִישׁ מַגִּידֶיהָ כְּגוֹן צָדוֹק וּבַיְתּוֹס. וְהָאוֹמֵר שֶׁהַבּוֹרֵא הֶחֱלִיף מִצְוָה זוֹ בְּמִצְוָה אַחֶרֶת וּכְבָר בָּטְלָה תּוֹרָה זוֹ אַף עַל פִּי שֶׁהִיא הָיְתָה מֵעִם ה' כְּגוֹן הָהַגְרִים. כָּל אֶחָד מִשְּׁלֹשָׁה אֵלּוּ כּוֹפֵר בַּתּוֹרָה:
Five individuals are described as Minim: a) one who says there is no God nor ruler of the world; b) one who accepts the concept of a ruler, but maintains that there are two or more; c) one who accepts that there is one Master [of the world], but maintains that He has a body or form; d) one who maintains that He was not the sole First Being and Creator of all existence; e) one who serves a star, constellation, or other entity so that it will serve as an intermediary between him and the eternal Lord. Each of these five individuals is a Min.
Three individuals are described as Epicursim: a) one who denies the existence of prophecy and maintains that there is no knowledge communicated from God to the hearts of men; b) one who disputes the prophecy of Moses, our teacher; c) one who maintains that the Creator is not aware of the deeds of men. Each of these three individuals is an Epicurus.
There are three individuals who are considered as one "who denies the Torah": a) one who says Torah, even one verse or one word, is not from God. If he says: "Moses made these statements independently," he is denying the Torah. b) one who denies the Torah's interpretation, the oral law, or disputes [the authority of] its spokesmen as did Tzadok and Beitus. c) one who says that though the Torah came from God, the Creator has replaced one mitzvah with another one and nullified the original Torah, like the Arabs [and the Christians]. Each of these three individuals is considered as one who denies the Torah.
The law would appear clear on who it's referring to, at least regarding apikorsim. Regarding minim, Rambam does speak about them sinning l'hachis in the halacha but not in the definition here. I've seen mumar l'hachis described as one who sins to anger God (as per this translation), one who sins out of spite, an intellectual (as opposed to emotional) sinner, and one who sins out of lack of faith or apathy. In any event, it is generally the alternative to one who sins out of a craving. Due to the potential confusion of who that refers to, the question in my mind can just as well be focused on apikorsim.
As another footnote, it also appears clear to be referring to individual action and not an act of a court, hence me seeking insight on what else this should be understood to mean.
Edit: I have been asked to clarify how this question is different from "History of Capital Punishment" on actions of a Beis Din. The difference is that this is a particular halacha which, at least on the surface, is not about actions of a Beis Din, but rather is written in a way that appears to describe actions of an individual.