Sometimes, the best thing you can do is back off.
Maybe the other person doesn't really want to talk about their problem, or they don't feel close enough to you to open up – or maybe they're already getting great support from someone else.
If you insist on helping, you can easily make their situation worse. Now they have to deal with their problem AND an annoying wannabe helper.
If you're a guy, you want to be especially careful here. It's common for guys to convince themselves that girls need their help (especially when they're attracted to her), and insisting a girl accept your help is a sure way to annoy her. If she needs your help, she'll ask you for it. If you cared about her, you would respect her no instead of looking for an opportunity to show off.
But whatever the gender of the person you're helping -- offer your support, and then if they choose not to take it, let it go.
I usually try to ask twice – for instance, “It looks like you're feeling down. Do you want to talk about it?”
If they say no, I might add, “Are you sure? I'm here for you if you need me.” If they turn me down again, then I let it go and change the topic.
Even if they do choose to talk about it, don't assume they want you to solve their problem. Several months ago, I had a friend who complained to me about a problem she was having. I suggested she do something to solve her problem, and when she decided she didn't like my idea, I went ahead and did it for her.
At the time, I thought I was being helpful. But when I told her what I had done, she was very upset. She explained that she was responsible for solving the problem, not me, and because I had done it for her it communicated that I didn't trust her to take care of herself. Needless to say, this caused her to feel very hurt and disrespected.
Don't make the same mistake as me – if you offer someone a solution and they don't take it, don't insist on it.
If you offer support and they turn you down, let it go. Let the suffering person be in charge.
Next: Educate yourself