Since, in most cases, the laws pertaining to the sick are the same on Yom Tov and on Shabbat, we will briefly review the laws pertaining to the sick on Shabbat and explain the special laws of Yom Tov. There are three categories of sick people according to halakha: 1) a gravely ill person whose life is in danger; 2) a “regular” sick person, whose whole body is ill but whose life is not in danger; 3) a mildly sick person, who is ill in part of his body or who experiences pain from a bodily ailment. We will now explain the pertinent laws.
Regarding a gravely ill person, the relevant principle is well known: saving a life overrides Shabbat and Yom Tov. Such a person is treated on Shabbat or Yom Tov in the same way he would be treated on a weekday, and all prohibitions are superseded in order to save his life.
Torah prohibitions may not be violated on behalf of a regular sick person, meaning one who is bedridden but whose life is not in danger, but rabbinic prohibitions may be violated on Shabbat to treat him.
Regarding Yom Tov, poskim disagree as to whether melakhot that may be done for food preparation may also be done for a sick person. Some permit, saying that the same way these melakhot may be undertaken for purposes of food preparation or other Yom Tov needs, they may also be undertaken on behalf of one who is sick. Others prohibit, maintaining that it is forbidden by the Torah to undertake such melakhot for a person who is sick but in no danger, because these melakhot are permitted only when they are shaveh le-khol nefesh. These poskim maintain that the needs of a sick person do not fit into this category (see above 3:6).
In practice, because this disagreement pertains to a Torah prohibition, the halakha follows the stringent position. Therefore, melakhot that may not be done on behalf of a sick person on Shabbat may also not be done on behalf of a sick person on Yom Tov (as is explained in Peninei Halakha: Shabbat ch. 28). Thus, medication may not be cooked for a sick person, nor may a flame be lit to sterilize a needle. Intravenous injections may not be given, because they cause bleeding (which is considered Ḥovel, “wounding,” a tolada of Shoḥet). In contrast, actions which are only rabbinically prohibited may be done for a regular sick person.
On Shabbat, the Sages permitted asking a non-Jew to perform melakha on behalf of someone who is sick (Shabbat 129a). According to Ran, this permission is limited to a non-Jew; a Jew may not perform a rabbinically prohibited action on behalf of someone who is sick. In contrast, Rashba maintains that a Jew may indeed do so. Le-khatḥila, we are stringent; be-di’avad, if possible, one should use a shinui in order to downgrade the prohibition to shvut di-shvut. When there is no choice, he may rely on Rashba (see Peninei Halakha: Shabbat 28:2 n. 2). However, on Yom Tov it would seem that even le-khatḥila, one may rely on those who permit doing activities that would normally be rabbinically prohibited, because the punishment for Yom Tov desecration is less severe than the punishment for Shabbat desecration. Even if one violates a Torah prohibition on Yom Tov, he is not liable to the death penalty as he would be if he did so on Shabbat. There are certainly grounds for leniency when we are speaking of a rabbinic prohibition. All agree that such activities are permitted for okhel nefesh, and the debate is only whether they are also permitted for someone who is sick.