A Bad Day said:
Isn't the IP address is given by the ISP?
That depends. You can be using a local network or an external network and the source of the IP is different. IP addresses assigned in your home by your personal firewall/router are typically internal addresses and the router has the only external address. In other cases, you may be connected directly to a network. It really just depends on the network being used.