
First things first, this is the proper drain set-up for a modern dishwasher. The drain from the dishwasher is brought up to the air-gap before connecting to the waste disposal (if one is present).
So what the heck is an air-gap, and what does it do?
It's the funny little chrome thing on the sink next to the faucet that you never knew what the heck it was. The air-gap is a basically a mechanism to make sure dirty water does not get flushed back into the "clean" dishwasher system. This is useful in case there is a sewage back-up in the drain system further on down the line.

The old style of preventing back-ups into the dishwasher was by a system called a "high-rise loop" (left). This system just involved elevating the returning dishwasher drain line above the kitchen sink drain. However, this just increases the pressure needed to back the system up and doesn't eliminate the possibility of contamination.
The air-gap (below) involves a high-rise loop, but inserts an actual "air gap" into the system. This way, if the main line were to back up into the dishwasher system it would reach the air-gap and spill out into the sink rather than going further into the "clean" dishwasher system. (Although sewage water in the sink is pretty darn gross too!)
Of course, thankfully all the problem was was just readjusting the clips and tightening the connection between the drain line and air-gap mechanism, but now you learned something!