How do you reset your wordpress theme to 'factory default'?

I downloaded a wordpress theme, and I did a small modification to the theme somewhere (I’m not sure where) that seemed to have ruined it.

I’ve tried deleting and reinstalling the theme, but the website keeps on returning to the ‘broken’ version which I was supposed to have deleted.

Does anyone have an idea how I can return it to its factory default or original version?