How does internet work?
The easiest way to understand how internet works is thinking about a road network, if you wants to go from one city to a distant one, you should prepare a route towards our target location. We likely make part of the trip by roads and part by highways. It's also likely we might need to switch to different roads/highways several times, those road switches use to be done on communication nodes (which sometimes match with cities)
Internet works on a similar fashion, information travels from origin to target through a path network, some times travelling through enormous highways and others on smaller roads, networks are tied together in communication points (known as nodes).
What's an IP address?
Each of those network points are identified by an unique identifier, this identifier is known as IP address, there are two IP address formats, the one you'd likely seen most IPv4 - a combination of four integers between 1 and 255 (xxx.xxx.xxx.xxx) which render more than cuatro billion combinations. Surprisingly this number is already short for the enormous amount of devices connecting to internet, so organizations setting the standards of internet created a new format (known as ipv6), this time they chose not get short again and this new format is created with 8 groups of numbers between 1 and 65535 in hex format, this renders the hardly described number of 3.4 * 1038 addresses (Something like 3.4 Duodecillions)
What says an IP address about me?
In order to be able to get information back once it's requested, on our messages the initial IP is added (our IP address) as well as the previous jump point. Our IP Address is our most private data, and can be used for a lot of different things, from creating profiles about users to accessing to our own devices remotely, but we will only focus on one of the information it provides which is widely used across internet: Geolocalization.
How do I get an IP address?
IP addresses - unless you contract a static IP from your provider - are owned by our Internet Service Provider and are dynamically assigned when we connect our device to internet so they can change although since we don't usually turn off our domestic router they don't change very often. So it's usual having the same IP address for weeks or months.
What's IP geolocalization?
Internet providers assign IP groups to specific geographical regions, and thos assignations need to be shared with internet managing organizations. There are companies whose business is tying all these data together to build geolocalization databases, with those databases given an IP address anyone can know in which city, town or even district an IP is assigned with a very low error rate. There are several places in which you can check your own IP address, i.e. DuckDuckGo search engine wil give it to you as an instant answer.
What is IP geolocalization used for?
The main usage is user segmentation, for stats (knowing the origin of visitors of a web site), or for ads (companies want to show ads only to those potential customers, so they use to segment ads for geographical regions) or local services (i.e. when you want to look for a shop or a coffee near your place).