We use the third conditional to talk about imagined past events: things that might have happened in the past, but didn’t happen. She wouldn’t have become ill if she’d taken the medicine.
To learn more about the second conditional, visit this Grammar Reference page. To learn more about the third conditional, visit this Grammar Reference page.