Back about 20 years ago when I was a wee electrician's apprentice up in Alaska, the first journeyman electrician I worked for pulled me aside and said with a very stern face behind his full gray beard; "James, you see all these electrical devices, light switches, receptacles, light fixtures and such? Well, they all run on smoke, if you let the smoke out, they won't work no more! Don't let the smoke out!
Funny, but okay, not really... I never have forgotten that colorful lesson and suppose you could apply the same analogy to yourself. When you're working on electrical systems, YOU run on smoke!
That being said, let's talk a bit about safety. It is critical to your safety to make sure that the circuit you are working on has been turned off. This is accomplished in the electrical panel/fuse box. Go there first, identify the appropriate circuit and make sure that it is off.
Also make sure that anyone else in the house is made aware that you are working on the electrical system and they don't accidentally let the smoke out of you by thinking they're merely restoring a tripped breaker. Turn it off, tape it, put a sign on it, or if you want to be a real pro, pick up an inexpensive "Lock-out/Tag-out" kit from the local home center and lock it. You gotta go there anyway to pick up the replacement light switch.
So what were we talking about, oh yea, replacing a bad light switch. Well, lets get with it. It's easy and you can get it done with a single standard screw driver and about 15 minutes.
Once the power has been turned off, remove the wall plate (plastic cover over light switch), then remove the two mounting screws from the light switch, at the top and bottom of the metal frame of the light switch, righty-tighty, lefty-loosie.
Being careful not to touch either of the two screws on the side of the bad light switch (Yet), carefully pull the light switch straight out towards you, there will be some resistance from stiff wires though there should be sufficient slack in the wires to pull the light switch out away from the wall a few inches, enough to work on it.
TEST, TEST, TEST to make sure the power has been turned off to the THIS circuit. You can do this with an inexpensive volt meter, or Non-Contact voltage detector, what we call a "Tic" in the trade. They are cheap (about $15 bucks) can be bought at the same home center you are already going to and will go a long ways to ensuring there is no smoke liberating current present.
I probably have a dozen Tics all over the place and use them almost every day, they're very handy and very cool. Man you are the new BMOC (Google it, I had to) if you have a Tic, trust me, all your buddies (or buddets for you ladies) will drool over it and look on it and you with envy. Besides, you have a legitimate excuse to go to the toy store, oh I mean chore store, sorry hon.
Back to the light switch, you will notice 3 wires attached to the light switch (Only 2 wires in older homes). Two wires will be attached to the side of the light switch and will be either two black wires, or one black and one white wire (Depending on whether it is a switch leg or switch loop, but not important at this point, more below...).
The third wire will be attached to the green screw on the top of the light switch and will be either a bare wire or green wire, this is your ground wire and is the most important wire.
The ground wire should ALWAYS be the first wire on, and the last wire off, this is for your safety as it provides a highly conductive, low resistance path to ground and electricity being lazy, always seeks ground and always via the path of least resistance, meaning that if there is a path to ground more attractive than you, no smoking. But you don't have to worry because you turned the power off right? Just covering basic safe working practices here...
Loosen the two screws on the side of the bad light switch and remove the wires. Now loosen the green ground screw and remove the ground wire, discard bad light switch.
Installing the new light switch is a piece of cake and all you need do is reverse the removal process. You may be wondering, ummm okay, I get the ground wire, there's only one green screw and only one green wire, no brainer. But what happens if you mix up the two wires that came off the side of the old bad light switch? No problem. You see, electrically it doesn't matter at all, you can put either wire on either of the two side screws and it will work just fine (Single Pole switch only for all you pro sparkies out there, but if your a pro and reading this, you have too much time on your hands, give me a call, I've got some wire stretching needs done).
Now just a mental exercise here (Don't actually do this!) but imagine if the power to the circuit was on and you were to touch the two wires from the side of the light switch together, the light would come on, [Angelic voices singing "Ta-da" here]. Anyhow, that's all the light switch does, it touches, or "Closes" the two wires together, completing the circuit, powering on the light.
Reinstall the new light switch back in the wall, re-secure the two mounting screws, replace the wall plate, turn the power back on at the panel, and thats it. Replacing a bad light switch really is a piece of cake.
Now you are for sure the BMOC, got to go to the toy store, have a brand new shiny Tic and your honey has a new open slot on "The List" to fill in and can even see the list now because you fixed the light, maybe you shouldn't have huh...
Cheers and happy & safe home repairing!