People gossip for a variety of reasons - they are upset and want to vent; they are mad and want to get back at someone; they are bored and have nothing else to talk about, etc. However, gossip tends to always have bad results.
Whenever you talk about someone else, it will somehow get back to them that you gossiped about them. That is always damaging to relationships, because people feel judged and used when others have conversations about them.
People gossip and talk about each other without knowing the whole story too. We may see people's actions, but we don't know their heart. When we pass along information, we aren't talking about intentions or thoughts behind actions but we just pass along actions, which can often be misinterpreted.
If you need to discuss a situation with someone, you need to confide in the person you are concerned about. An issue will only get resolved if you bring it to someone's attention, not if you spread it around to other people.
I think you can confide in trustworthy people and discuss a situation without gossiping, a heartfelt conversation. I think you can also talk through situations with loved ones without gossiping - it depends on why you are doing the talking.
Next time you want to talk about someone though, think about why you're doing it and how it will help to tell the person that you are telling. Will it hurt the person you're talking about? If there is any possibility, don't do it.
Like the old adage, if you don't have something nice to say, don't say anything at all.