First, your device indirectly connects to the internet by connecting to a network that is connected to the internet, which then grants your device its own access.
When you are at home, your network is your Internet Service Provider, or ISP. If you are at your office, it is your company network.
Your IP address is assigned to your device by your Internet Service Provider.
All your internet activity goes through the ISP, and they route it back to you by using your IP address. Since the network is the one giving you access to the internet, they assign an IP address to your device.
However, your IP address can change. For example, if you turn our modem or router off and on, it might change. Or, you can contact your ISP and they will change it for you.
If you are traveling and take your device with you, your IP address will change. It will not be the same as your home address. That is because you will be using another network to connect to the internet, that will be assigned to you by the ISP of the network you are using. For example, perhaps you are using WiFi at a hotel, airport, or coffee shop.