There are two different kinds of IP addresses that are used on most home networks......"public" and "private".
The IP address that your Internet Service Provider (ISP) supplies to your gateway is known as a "public" IP address, and it will normally change from time to time unless you are paying an additional fee to your ISP for a "static" Internet IP address. In theory, a dynamic public IP address might slow down a hacker just a bit who is trying to crack your network from the Internet.
The IP addresses that your gateway provides to the devices on your network are known as a "private" IP addresses.....because they are assigned to devices on your private network. A "private" IP address will always start with 192.x.x.x, 10.x.x.x, or 172.x.x.x.
Your Time Capsule is receiving an IP address from the gateway using one of the IP address ranges above. You can see the actual IP that the gateway is providing to your Time Capsule by opening up AirPort Utility and clicking on the picture of the Time Capsule. Look for the IP address in the smaller window that appears.
There are advantages in having a static IP address assigned to the Time Capsule, so it will always receive the same IP address from the gateway. The "private" IP address that your Time Capsule receives has nothing to do with the "public" IP that your gateway receives from your Internet provider, so my advice would be to leave the Time Capsule set to receive a static IP address from your gateway.
But.....you can change the settings in AirPort Utility for the Time Capsule from Static to DHCP if you want. Then, the Time Capsule will be assigned a random IP private IP address that will likely change daily or week to week. The Time Capsule is more likely to "disappear" from AirPort Utility from time to time if you use the DHCP setting, so you will need to power off both the gateway and Time Capsule and then start both of them back up to try to get things working again if this occurs.
Security wise, it makes no difference at all whether the Time Capsule receives a dynamic private IP address from your gateway or static private IP address from your gateway.