How do pain medications work?