Nobody likes being gossiped about, but when the gossip is coming from friends, it's especially hurtful. If a friend of yours is talking behind your back and gossiping about others you know to your face, your friendship may not have a chance unless you address the issue. Help your friend to be more aware of what she's saying and why and, if need be, deal with the thornier issue of malicious gossip.
Bear in mind that your friend may not be aware that what she's doing is gossiping. If she's sharing information about you and others that shouldn't be shared, it could be because she isn't aware that different people have different comfort zones in terms of what is and isn't public information. She may also be overly impulsive when she talks to people and simply be “thinking aloud” without considering the consequences. Give her the benefit of the doubt when you talk to her; even if you suspect some level of malicious intent, you can probably stop it in its tracks just by calling her out.
Avoiding the “G” Word
The word “gossip” has a negative, malicious connotation. It is unlikely that your friend will respond well to you using it unless he already understands that he has a problem with gossiping. If that's the case, you can call him out briefly and remind him of any commitment he's already made to solve the issue. Otherwise, talk to him directly about what he said about you and to whom and make it clear that you had told him those things in private. Point out specific times when he's gossiped about others while in your presence and why you don't feel what he said was appropriate.
You may need to help your friend in breaking her gossip habit by making it clear to you which things you personally don't want her talking to others about. Say things to her in conversation like, “This is just between you and me, okay?” or “I'm telling you this in confidence.” If she's less than aware of herself around other gossipy people that you know, specifically ask her not to tell those people. Encourage your friend to use your preferences as a guide to understanding the boundaries of other friends in terms of what should and shouldn't be shared.
If your friend is unable to stop sharing information about you, but is non-malicious, end this part of the gossip problem by limiting what information you share with him. When he starts to say something gossipy about others, simply change the subject or decline to engage or show interest in the conversation. Make it clear to other friends in your circle if ever you are telling them something that you don't want to get back to your gossipy friend. If, however, your friend is gossiping maliciously and will seek out information even if nobody shares it with him, your only recourse may be to end the friendship.