What is the main function of pills

What is the main function of pills

Diuretics(water pills),some pills are contraceptive (family planning pills)

yes contraceptive how could it be used

cure headache