I love doing dumbbell shoulder press because between all the shoulder exercises it's the one that so far gave me the best muscle gains.
We're talking about a compound exercise that works your shoulders (anterior deltoid as primary muscle and lateral deltoid as secondary), and also triceps and upper traps. It's safe to say that also your core is well stimulated as you need to keep your abs tight to be in a stable position.
You execute it from a sitting position, better if your bench has a back support.
PRIMARY MUSCLE: Anterior Deltoid
SECONDARY MUSCLES: Triceps, Lateral Deltoid, Traps
EQUIPMENT: Bench, Dumbbells
Any time you push you work your chest, shoulders and triceps. From a flat position, the more you incline the more the focus moves from chest to shoulders. A 90 degree angle means shoulders workout.
INITIAL POSITION: Sit on a 90 degree incline bench with your back nice and flat on the back support. Keep your feet flat and stable on the ground. your head is in neutral position with chin up. Grasp two dumbbells with palms facing forward and keep your elbows at a 90 degree angle with forearms vertical. Elbows and shoulders should be at the same height. Dumbbells should be at the same height of your ears, or just a little bit lower.
MOVEMENT: Push up the dumbbells on a vertical line till your arms are almost extended above your head and dumbbell almost touch. Don't lock your elbows to keep the tension on the muscles. At this point return to initial position, slowly.
BREATHING: Exhale while you push and inhale while your lower the weights.
TIPS and ERRORS: You can do dumbbell shoulder press on a flat bench too, but i discourage it because it's much safer to have the back support. Some people lower the weights too much, down to the point that they are on the same level of their shoulders. Don't do that. It is true that the exercise feels harder like if you were working better, but it just stretches your muscles for no good reason. Don't arch your back, keep it always flat on the back support. Use a spotter to follow your movement for safety.
You can execute alternate dumbbell shoulder press, which mean lifting one weight at the time. I prefer the classic way, but you're free to try this out and see how it goes. If you like it, keep doing it, no problem.
If your gym is a good gym it should be equipped with a shoulder press machine, which is nothing more than a dumbbell shoulder press where the movements are guided by the machine.
Of course you don't use stabilizer muscles like when using dumbbells, but I think it is still a good option, especially if you don't want to risk injuries.
I know guys that really injured their shoulder doing dumbbell shoulder press, and it's not fun.
It's up to you whether to use dumbbells or machine. I am not the type of guy that says that machines are crap while free weights are the way. Sometimes machines are great too and force you to use the muscles that you are expected to use.
It's easy to cheat with free weights, and it's common to work too much the secondary muscles. In that case a machine would do the job better.
Usually people train shoulders on the same day with chest, and usually chest requires you to do press exercises. If that is the case you're already tired enough and maybe a shoulder press machine is your best choice. It's safer to use it when you're tired and maybe you can't execute a free weight exercise with the proper concentration.