Turn off the circuit that holds the dishwasher to cut power to the appliance.
Maneuver the dishwasher so you can work on the rear where the drain outlet is located. If the dishwasher is already in place, for example, underneath a kitchen counter, pull it out.
Attach one end of the dishwasher drain hose to the outlet on the dishwasher. Secure in place with a hose clamp.
Attach the other end of the drain hose to the sewer connection. Depending on your installation, this might be either the sink trap or the garbage disposal. Secure with another hose clamp.
Create a loop in the drain hose by holding the middle of the hose in place against the back wall of the installation location. For the drain loop to work properly, the middle part of the drain hose needs to be higher than both the drain outlet on the washer and the inlet at the sewage connection. Secure the hose in this position with a pipe clamp. Use more than one if necessary.
Restore the power to the dishwasher circuit.
Run a test load in an empty dishwasher. Watch the drain hose and check for leaks. Tighten if necessary.