Sometimes, just listening attentively to your friend will make them feel better about a challenge they're facing. To listen well is to imbibe what is being said without thinking of what you're going to say in response.
Perhaps when you listen, you're even thinking of how you're going to offload your own troubles onto your friend after they stop talking about theirs. That may be the last thing your friend needs. Listening well means refraining from interrupting your friends and giving them your full attention.