As I understand it, it's also your IP's location, not necessarily yours.
For example, my IP is from my provider: 188.8.131.52, it says I'm in Kettering, Nottinghamshire because that is where my provider is based. I'm not, I'm in Kent.
Am I missing something? Is there more to this?