Make sure that you are not holding your shoulders in an awkward position. Be sure to have a natural spinal curve. You do not want to have your lower back flat on the bench, but you do not want to force it to curve too much either.
Grip the bar tightly. Do not use a thumbless grip, the bar can slip from your hands and crush your face. Wrap your thumbs around the bar to secure it.
Avoid bending your wrists. Straight wrists will prevents wrist pain, and will give you more stability and strength performing the press. You should place the bar in the heel of your hand (directly above your wrist). Notice that if you place the bar more towards the base of your fingers or in your palm, your wrist gets bent back.
Don't flare your elbows 90° on your sides when the bar is down. This puts too much stress on your shoulders, and might cause pain and injuries. Keep the elbows at about 75° from your body. You can ensure a good position if you lower the bar to touch your mid-chest, and not the upper-chest or neck area.
Where you position your hands will affect which muscle group you work most. Widen your grip slightly to increase the amount of pectoral muscles (the chest) involved in this exercise, but will be more difficult on your shoulders. Bring your grip in slightly will engage your triceps more, but will be less effective for the chest. For a standard bench press, opt for the medium grip.
For a good medium grip width, make sure that when the bar is lowered, your forearms are vertical to the floor, and not angled.
Make sure to use weight you can manage, you don't want to get stuck under the bar not being able to lift the barbell. If its your first time, try to lift the bar without weight on, it is quite heavy on itself. It is also a good idea to have a spotter by your side.
The biggest risk with this exercise is having the barbell fall on you, while you can't push it back up. The heavy weight might fall on your neck and strangle you, or fall on your chest and crash your rib cage, or even drop on your face if you're really unlucky.
The best way to be safe is to bench press in the power rack, where the safety pins will catch the bar no matter what happens.
If you don't have a power rack you should get a spotter that knows how to spot, since most people aren't good spotters. Or do it in the smith machine, which won't help you if you suddenly drop the weight, but can help if you're close to failure and still can manage it.
if you don't have any, make sure to only use light weight you sure you can manage and avoid reaching failure.