Halakha does not distinguish between "medicine" and "supplements" with respect to the laws of kashrus. There is a prohibition on eating non-kosher food, but certain considerations cause that prohibition to be overridden. It seems to me that kosher options are always preferable to non-kosher options when all else is equal. However, there are three halakhically-recognized types of illness, which will affect whether non-kosher medicine or supplements may be taken:
- Life-threatening illness
- Non-life-threatening illness
Life-threatening illness (חולה שיש בו סכנה)
For a life-threatening illness, one can trivially take non-kosher medicine when kosher medicine is not available since this is a case of pikuach nefesh. Seemingly this would also apply to a medication recommended by a doctor to prevent a life-threatening illness that one is susceptible to. (An obscure exception may be medicine derived from an idol.)
Non life-threatening illness (חולה שאין בו סכנה)
Star-K defines this category as someone with a fairly significant amount of discomfort, but who is not in life-threatening danger. Their examples are:
- One who is experiencing symptoms of the flu.
- One who suffers from chronic debilitating arthritis pain.
- One who suffers from migraine headaches or mild depression.
- A pregnant woman suffering from non-life threatening complications (e.g. lower back pain).
- A woman who has given birth in the past thirty days without any known problems or who is experiencing non-life threatening postpartum complications. This may apply for an extended period of time.
In such a case, the Shulchan Arukh (YD 155:3) rules that non-kosher medicine may be taken if consumed in an unusal way (i.e. not the way we normally eat things, for example by swallowing a pill whole). There are a couple of exceptions to this cited in the Shulchan Arukh which are not permitted in this case even if eaten in an unusual way, but none of them are likely to appear in medicine that you would get in the drug store.
The Star-K (in the article linked above) rules that in the case of discomfort (e.g. slight joint pain, runny nose, mild headache, etc.) or for a healthy person consuming supplements, one should make every effort to choose kosher-certified medicines or medicines with all kosher ingredients, even if consumed in an unusual manner. When no kosher option is available, a rabbi should be consulted as it may still be permissible when not eaten in a normal manner.
Still, we live in a time when the strict kosher consumer has many available options, and this is no different when talking about medicine (perhaps this is why the Star-K rules as they do). https://www.koshervitamins.com/ has a huge array of kosher-certified vitamins, medications, and supplements. Also, while many over-the-counter medications are not marked with a kashrus certification symbol, the Chicago Rabbinical Council maintains a list of over-the-counter medications and their kosher status (some are listed as acceptable even without a kosher symbol).