Help understand what's in the electric box
Put it back together the way you found it.  

I don't really care if you substitute a new switch when you reassemble it. I'm more concerned with the wires being where they belong.

The #1 mistake people make in situations like this, is they take too much stuff apart because they're curious, and then they end up with a mess. And it's even harder to troubleshoot because remember, it started broken.  This is gravely misguided.  Not least because what's installed may be wrong.  It is certainly broken, and my guess is not there. 

Do your learning from books, and read the whole book. Not online, because online is like looking through a keyhole: you need the big picture, the entire landscape.  Without that, you can't even know which questions to ask.