To safely jack up a car, first put the jack under the part of the car that it should touch when the car is raised. Then, lift the vehicle using the jack, and place jack stands below the vehicle near where the jack is contacting it. Finally, lock the jack stands in place, and lower the jack so the car is resting on the stands. When the car is securely on the stands, remove the jack.
Always use jack stands when working underneath the vehicle. You should only use the jack to get the car off the ground, not to hold it in place. Always make sure to use wooden wedges or bricks behind the wheels on the side that isn't being lifted to prevent the car from rolling. Jack up the vehicle on level ground and put the car in Park with the emergency brake engaged, too.
The proper place to put the jack under the car is usually listed in the owner's manual of the vehicle; a dealership can also help with where exactly to put it.
Never substitute bricks or boxes for jack stands as they are not nearly as stable. To make sure the car is securely on the jack stands, wiggle it a little. When done working under the car, replace the jack, take away the stands, and lower the car back down to the ground.