Medicine is a healing item, added in the 1.2.5 update. They heal a few hearts when consumed. Doing so also initiates a sound byte of a man with an oriental accent lecturing another person to take his/her medicine.
Medicine is also used to remedy a pony's sickness.