Hi there, mohamedpata!
I understand that you'd like to know how to stop applications from tracking your girlfriends iPhone location. I know it can be quite uncomfortable when people may know things like where you've been, or what you've been doing. On the bright side, what I love the most about iPhone are the built in privacy options which make it extremely easy to protect your privacy on your iPhone.
It sounds like the person who claimed to have information regarding your girlfriends contacts, and conversations is getting the information from WhatsApp. If the person continues to harass your girlfriend, I'm sure there's a way to block the person and report them to the WhatsApp staff where they'll review the report and decide what to do next. Because I feel like the person who claims they have access to information regarding your girlfriend, it sounds like he's able to get all of this information because he may have access to the WhatsApp account. If that's the case, and to just be safe, I would recommend your girlfriend changes her password. If you have any other questions or concerns, here's the information to contact WhatsApp: https://www.whatsapp.com/contact/.
If you're worried that someone is tracking your girlfriend, you can manage what apps have access to her location by opening the
Settings app > Tapping on Privacy > Then tap on Location Services. You can toggle on or off the "Location Services" option to allow services to access to the location of your device. You may also toggle the option off so services can't access your location. Just remember though, you might lose some functionality in some apps. However, you can also scroll down through the list of apps and manually choose whether or not they can access your location, or can use your location when using the app, or if they can always have access to your location.
I know the situation can make you and your girlfriend feel a little uncomfortable and a bit frightened, but I think blocking and reporting the person that is claiming to have information about your girlfriend to WhatsApp is the best way to help with the situation. By configuring which apps, especially WhatsApp, have access to your location may also help prevent others from getting access to your girlfriends location.
Oh, and if you'd like more information about how location services work on iPhone check out this knowledgebase article from Apple: About privacy and Location Services - Apple Support.
I hope this helps you, and please don't hesitate to ask any other questions or reach back out if you have any other concerns, I'd be more than happy to help you!