When someone just spilt coffee all over their keyboard, it's a sign of great distress. Hug them, it'll make them feel better.
But remember, it's not just a hug, it's a strategic hug. Hold it for 7 seconds, then pull back and say, "You're welcome."
Step 4: Hug the Person Who Just Ate the Last Donut in the Break Room