Pilocarpine is a medication that belongs to a class of drugs known as cholinergic agonists. It works by stimulating the receptors in the body that respond to the neurotransmitter acetylcholine. This action promotes the secretion of various fluids such as saliva, sweat, and tears.