You can use both medicine and pill and both can mean that you are taking legitimate therapy. However, sometimes these terms are interchangeable, and sometimes not.
- Historically, a pill was a dosage form made manually, using the active substance, a sugar and a liquid binding agent :
small, round, solid pharmaceutical oral dosage form of medication that was in use before the advent of tablets and capsules. Pills were made by mixing the active ingredients with an excipient such as glucose syrup in a mortar and pestle to form a paste, then rolling the mass into a long cylindrical shape (called a "pipe"), and dividing it into equal portions, which were then rolled into balls, and often coated with sugar to make them more palatable. (Wikipedia)
Today a pill refers to all oral solid dosage forms that are intended to be swallowed as such (note that an effervescent tablet for example, most likely won't be referred to as a pill).
The pill or capitalized The Pill (definition 2) refers specifically to birth control pills (i.e. oral contraceptives).
In everyday (colloquial) usage to use the term pill meaning medicine taken orally in a solid dosage form is fine, but as a technical term it would be incorrect (unless of course you are making an exhibition about the history of pharmacy).
But what if you are taking a medicine in a different dosage form?
You might need to take a syrup, an injection (insulin e.g.), use an inhaler etc. In this case pill doesn't work and you have to use the term medicine or use the term for a specific dosage form.
To take a medicine is used less often than to take a pill. But that doesn't mean that the word medicine is used less common in this sense than the word pill. Medicine is more often used in different constructions:
You need to take this medicine three times a day; this one you need to take twice a day.
Make sure that the children take their medicine.
Kanga replied, “Roo, dear, you must take your medicine" [...]
“I liked it better when Tigger ate my medicine for me,” said Roo. (House at Pooh Corner, by A. A. Milne)
The word medicine can be both countable and uncountable, according to LDOCE.
This Google Ngram shows that in fact, medicine (green) is used more often than pill (bright blue and dark red) except when they are used with the indefinite article:
A side note: medicines can also be administered and (especially for topical medicines) applied. (See more in this post. You definitely don't eat a medicine, but this doesn't apply to Tiggers, because "that's what they like best".