Pill and tablet are used almost interchangeably when it comes to medicine. However, they both have other uses too. Like a tablet is an iPad or one made by Samsung. Also we use pill in certain expressions like “It’s a tough pill to swallow” and you can’t replace pill with tablet.