This question already has an answer here:
The last couple days I was talking to someone online, and this person said that my IP address was this and that, out of nowhere... Which was wrong, probably because I was connected to a VPN (not the point) but still, I'm worried now, how can you even check someone's IP address? Is it dangerous? Why would someone do it? To get my location or any other reason?