The first you want to buy the correct shock absorbers for your car, if you do not know what kind you need just go to your local automotive parts store and go to the parts department.
When you get there ask the sales representative for shock absorbers to which they will reply "for what kind of car?" Give them the year, make and model for the car you wish to change the shocks in and they will go get it for you.
Now that you have the shocks it is time to remove the old shock absorbers, raise the car up with either a hydraulic jack or a scissor jack and place two jack stands under the car.
Adjust the jack stands until they are almost touching the car and then lock them in place. Be sure the car is on a level surface, the hand brake is engaged and something is blocking the rear tires to prevent the car from rolling.
After the car is raised slowly lower the car onto the jack stands. Give the car a little push to make sure the stands are secure.
Loosen the nuts and bolts at top of the shock absorber with a socket wrench first. Do not try to completely remove it yet. You can find the top of the shock absorber under the hood of the car in the area directly above the wheel well. Again do not try completely remove the shock.
Once both shock absorbers have been loosened get under the car and remove the bottom end of the shock absorber. Get under the car and remove the bolt from the bottom of the shock absorber.
When the bottom end it released remove the shock absorber and replace it with the new shock absorber.
Be sure the top of the shock absorber is lined up correctly before securing the bottom end. After the new shock absorber is in place tighten the top end.