Power off your dishwasher and open the door. Notice the metal, half-moon-shaped hinges. Connected to these are the springs that run vertically up the sides of the dishwasher.
Lift the damaged spring up and detach its top end from the metal loop it attaches to.
Remove the bottom end of the spring from the catch in the metal door hinge.
Attach one end of the new spring to the loop at the top of the dishwasher.
Pull the spring down and attach its bottom hook to the catch in the hinge.