The first thing to do is make sure that your old one is not just jammed. Every disposal comes with a wrench, if you can't find yours they are available at hardware stores like Home Depot. There is usually a circuit breaker on the bottom of the disposal. Don't assume your disposal/disposer is broken simply because it stops working. You should check inside for anything that might be lodged in the openings of the drum. Remove any obstruction with needle-nose pliers.
If you can not see anything inside the disposal, insert the wrench into the bottom of the unit, (See photo) and twist right and left. If the motor spins freely, make sure that the circuit breaker hasn't tripped by pushing the reset button, usually a small black or red button on the bottom of the unit. If these two things don't work, and your warranty has expired, it's time to replace it.
I recommend that you shop around before buying, disposals/disposers usually sell for between $50.00 and $300.00, they are all pretty good. When I do repairs on a rental I use the most inexpensive one I can get, usually a badger because the tenants don't care what they put in it. Under normal use a 1/3 hp will usually last 10 - 15 years and most come with at least a 1 year warranty. Since they all have different hook ups I recommend taking the old one with you to make sure the new one will work for your particular application.
Lets start removing the old disposal/disposer. Clean everything from under the sink. Some installations have the power cord plugged into a wall outlet and some are direct wired. The next thing you need to do is disconnect the power. If the unit is plugged into the wall just unplug it from the wall. If it is direct wired you will need to shut off the power at the breaker box. When you have the power off, remove the panel from the bottom of the disposal/disposer, the single screw in the small panel next to where the wire goes in (See Photo). Remove the ground screw and the 2 wire connectors (Note the wire colors and locations). Remove all the hoses and pipes from the disposal/disposer, there are normally 2 connections, one for the dishwasher, and 1 for the discharge.
Now that everything is disconnected, there is a large mounting ring at the top of the disposal/disposer with 3 tabs on it (marked in red on the photo, support the disposal/disposer from the bottom and turn this ring counter clockwise until the disposal/disposer comes loose from the sink. (Note: This ring my be pretty tight, you may have to tap it with a hammer or put a screw driver through one of the tabs and turn the ring counterclockwise). Be careful as some of these units are a little heavy when you are on your back under a sink. Dump any excess water out and take the unit to the store with you to get the new garbage disposal/disposer. Try to get one with similar drain placement to make it easier to install later.
Now that you have your new garbage disposal/disposer lets finish up. Lets remove the sink flange assemble, loosen the 3 mounting bolt(See photo), enough to get to the retaining ring under the lower mounting ring, slide the lower mounting ring up and pry off the retainer ring with a screw driver. Slide the lower mounting ring off and push the sink flange up through the sink. Clean off all of the putty and/or caulking from the sink.
Now find the new parts for the sink flange assemble, you should have a new sink flange, rubber washer, cardboard washer, metal backing ring, lower mounting ring, and a retainer ring. Take some of you plumbers putty and roll it into a snake (like you did with your play dough when you were a kid), about 1/2 to 3/4 of an inch and about 10 - 12 inches long. Press it all around the under side of the sink flange, from the top of the sink firmly press it into place, trying to keep it as centered as possible. Next from the bottom of the sink, slide the rubber washer, cardboard washer, and metal mounting ring into place. Next comes the lower mounting ring, the one with the bolts. Slide it all the way up, enough to get the retaining ring into place, when the retaining ring is in place tighten the bolts evenly just until a little of the putty is squeezed out from the top of the sink flange.
It's time to put the new garbage disposal/disposer into place. It is much easier to attach the wires while the disposal/disposer is out so lets do it that way. If your new disposal/disposer came with a plug already attached and you have an outlet under the sink all the better, if not you will need to attach the old wire you removed during disassemble, to the new garbage disposal/disposer. Remove the cover from the bottom of the new disposal/disposer and connect the black wire to the black lead coming from the new garbage disposal/disposer and the white wire to the white lead with wire nuts, they should come with the new disposal/disposer. Next connect the green ground wire to the green ground screw on the new disposal/disposer, and replace the cover.
The new garbage disposal/disposer comes with a nipple to connect to the discharge hose coming from your dishwasher, usually plugged. If you are going to use this nipple you will need to poke out the plug with a screw driver and retrieve it from inside of the new disposal/disposer. Now lift the new disposal/disposer up to the sink flange and push the mounting ring up and turn clockwise to engage with the lower mounting ring (The one with the bolts) continue turning until it is tight. Tighten the bolts just enough to hold it in place, we may still need to turn the disposal/disposer some to get the drain assemblies to line up. To connect the disposal/disposer drain outlet, slide the new rubber washer over the the pipe and onto the flanged end of the plastic crosspiece, then slide the metal flange on from the other end. Tip the bottom of the metal flange into its slot in the disposal/disposer and tighten the fastening bolt through the top of the flange. Make the rest of the drain connections. When all the connection are made, tighten the three bolts evenly until most of the putty is squeezed out, and the sink flange is tight and centered. Clean off the excess putty. Congratulations once you put back all that stuff you took out from under the sink when we started your done! I hope this was helpful and good luck.