Grief is a necessary part of living a full life. The best way to support someone who is grieving is to appreciate that their grief is part of having loved and invested ourselves in the world and in people. We don't have grief if we didn't care. Grief is complex and can take a long time to move through, far longer then the time we tend to support people in our culture. So first off, be patient. In some cases it can be years of heart ache, particularly with loss of a partner or family member. For the person going through it, there is a loss of identity and orientation to the world that is both painful and confusing. In the acute stages ,it can be hard for the person to think clearly, they may feel numb, distant or just not like themselves. Allowing people to be how they are and not making efforts to make them feel 'better' but rather making every effort to listen when they want to talk and not to push it when they don't is ideal. You are trying to be there for them, so ask what they want. Don't make assumptions. You have to ask yourself what you are comfortable and capable with in terms of supporting this person in their grief. Do you feel comfortable listening to and appreciating their difficult emotions (pain, anger, fear, etc) without changing them? Or are you better suited to make food and run errands for them or to take them to a movie? Be honest with yourself. If you are dying to hear how they feel and they don't want to talk, are you able to set your needs aside and just be with them however they ask you to be? The biggest thing about other people's big life experiences is that they tend to make us feel a lot of things too. So if we have certain things we want to feel or don't want to feel, we may not be able to make room for whatever they need. So first, get clear with yourself about what your own comfort and needs are around their experience. If their experience is upsetting you, you could be looking for support for yourself rather then looking to support them.
Most of all be patient with the person and your relationship with them. They may be grumpy, weepy or distant. They may seem like themselves when it seems they should be upset. There is no precise formula. Being sincere is always the best bet, which also means if how you are is normally not very connecting or is goofy, that's likely your best bet now.
One of the tough tings about grief is that is can be isolating because people don't know what to say or how to be, so they avoid you or are super weird. Just be there and be yourself, your willingness to do that in the hard times means more than thinking of the right thing to say.
On that topic, what should you say? Ask if they want to talk about it in a direct way when its a good to talk. If they don't, ask if they want to talk about something else. If they choose to connect with anyone on in nearly any way, that is success. You may not talk at all about 'the elephant in the room' but if you are there with that person doing what they like, you are helping.
Most of all, remember they are in charge of their grief, they are the only ones who can go through it. Trust them.