A small, round dose of medicine is a pill. If you get sick, you might take a pill, which is a pain because it usually tastes bad. A person who’s a pain can also be called a pill.
In addition to medicine, you can take vitamins or other supplements in the form of a pill. Most pills have to be swallowed whole with water, but some can be chewed. Because of the association of pill with yucky medicine, there's also the colloquial meaning of "unpleasant person," like a little brother who's a total pill. And from the same association comes "a bitter pill to swallow," for "a difficult or painful necessity."