You can perform the dip on a set of parallel bars, gymnastic rings, or straps. Develop the dip first on the most stable surface: the parallel bars. After that, try gymnastic rings because they make for the greatest challenge and allow for more freedom of movement.
Here are the steps to the dip:
Stabilize yourself on top of a set of parallel bars (or rings or straps). Lock your elbows and keep your body as close to vertical as possible.

Don’t let your shoulders shrug up. Press yourself away from the bars/rings.
Slowly start to bend your elbows and come down into the dip.

To lessen the stress on your shoulders, you may begin to lean slightly forward, tilting your body into a more horizontal position. Continue until your elbows reach a 90-degree bend.
Press back up into a full lockout position.
The dip is most commonly seen in gymnastics training. It strengthens the shoulder and the elbow joints (just be careful not to push it too far or too much at first), while building the deltoids, chest, and triceps.