Listen carefully to what they have to say.
Try to sense how they're really feeling.
Make them laugh to lighten up their mood.
Offer to help them in anyway you can.
Start giving them advice based on your past experiences.