This primer covers the installation of basic drop-in speaker upgrades; this is to say that the speakers you are replacing are the same size as the new ones you are putting in.
1. The first step is to remove the negative terminal from the battery in your car. This is a good idea any time you are working with electrical wires in your car. If you don't do this step, touching one of the bare wires to metal may fry your head unit.
2. Remove the old speaker. You will almost certainly have to remove trim panels or a speaker grille to access the mounting hardware for the old speakers. Be gentle when removing trim panels, as they can be fragile and are sometimes expensive to replace. Once you have access to the speaker, undo the bolts holding it in and pull it out. Once the connection wires are visible, unplug these from the back, taking care not to let them slip away into the dash or door of your car.
3. Now you should have an empty mounting hole. Test fit your new speaker by holding it into the hole. Do the mounting holes for the new speaker match up with those of the old? If not, use a permanent marker to mark the hole pattern of the new speaker on the door. Next, remove the speaker and drill holes in the panel where you marked it. Once you are sure that the speaker will physically fit in the factory location, move on to the next step.
4. Test-fit the old speaker wires to the new speaker. Do the connectors fit? If they do, plug them in. If not, your new speakers should come with connectors. To crimp these connectors onto the old speaker wires, first cut the old wires, strip both wires to be connected, then place the stripped ends together in the crimp cap and pinch the entire thing together with a crimp tool. Take care to match the red (positive, or +) wires with red, and the black (negative, or -) with black. Finally, test fit the connectors to the back of the speaker. They fit now? Good. It's time to put it all together.
5. The last step is to plug the speaker in, put it in place, and screw it down. Replace any trim you may have removed, and test them out. Be gentle on your new speakers until you get used to them. To ensure their longevity, never turn the volume up so loud that they begin to distort, as this is very bad for the cones.
This process will work, provided that you have the right size speakers to fit the job. If you are trying to fit a different size speaker into the car, you will need to find an adapter. These are sold at most car audio stores, and come with easy-to-follow instructions that will allow you to mount similarly shaped speakers in the stock locations.