Most important of all, try to be a good listener. You cannot fix or cure their grief, or make it go away – but if they want to talk, then letting them talk about what they are going through, or about the the person who has died, may be the most helpful thing you can do.
Letting the person who is grieving talk about the person who died, can help with their grieving process. So, if they want to talk about them, don't try to change the subject. Listen to what they have to say without interrupting.