Chi
Maybe you have a bad switch or maybe you want to install a dimmer switch. The process is pretty much the same for either. The only additional step if you are installing a dimmer switch is to make sure there is enough room in the box because dimmer switches have a bigger body.
You won't need many tools to perform this job. In most cases a flat and Phillips screwdriver are all you need. Occasionally you will need a pair of pliers to reform the loop of wire (terminal loop) if the last guy was a dufus. Also sometimes you will need a very small flat blade screwdriver if the device has been wired using the pressure terminals on the back of the device.
As always a little preparation makes the job go smoother. Make sure that what you need is a single pole switch and buy it. If the light or device is controlled from only one location then that is a single pole switch.
Turn off the power and remove the device box cover. Under that you will find two more screws near the top and bottom of the box that actual hold the switch in place. Remove those and gently pull the device towards the room. Until you have access to the terminals to with the wires are attached.
There should be two wires, usually black attached to the terminals on the side of the switch. You may or may not have a bare or green wire attached to the metal tab at the bottom of the switch. Don't panic if the wires are a different color as long as there is only two everything is fine.
No wire attached to screws?
Sometimes devices are wired using push in terminal on the back of the device. These wires are released by pressing in the small metallic tab and then pulling on the wire.
A single pole switch is hard to mess up, but this is a good time for you to learn good work habits. Take one wire at a time loose from the old switch and connect to the new switch. I once was in a home where the homeowner had taken all the switches out of a 5 gang (5 switch) box and did not even label the wires as he did so. To this day I wonder how much the electrician charged him to clean up that mess.
The wires should have a neatly formed loop that looks a lot like a question mark except the loop should be a bit longer. That loop should be placed under the screw so that the open side faces in a clock-wise direction. The reason is so that the wire will be pulled to the screw as the screw is tightened.
Once you have all the wires are connected gently bend the wire so that the device can be properly seated in the box, replace the cover and turn on the breaker.