Oxybutynin is an anticholinergic medication primarily used to treat overactive bladder and urinary incontinence. It works by blocking muscarinic receptors in the bladder, which reduces bladder muscle contractions (smooth muscle spasms), leading to decreased urinary urgency and frequency.