IP address (Internet Protocol address) is a numerical way of identifying your computer on Internet. Website can find much information by IP address. For example, we've found your country on this page.
When someone (such as ISP and website) applys for the allocation of IP address, he needs to submit relevant information. Thus we can find the IP address' country and location information.