There are many possibilities.
A fixed IP address is when you configure your device with an explicit IP address (e.g. you type the IP address in the configuration), a dynamic IP address is when your device uses DHCP to obtain an IP address.
With DHCP, your IP address might change when you get a new lease. But this depends on several factors.
For example, it's possible to always get the same IP address even with DHCP: that is done with a reservation on the DHCP server. The MAC address of your device is entered into the DHCP server configuration, together with an IP address.
When your device requests an IP address via DHCP, the DHCP server will always give you the same IP address (the one that is reserved for your device).
If there is no reservation, the DHCP server will assign you a free IP address from its pool.
Why do you sometimes get the same IP address and sometimes not? This depends on different factors.
If your former IP address is in use by another device, you can not lease it.
A full DHCP communication is: Discovery, Offer, Request, Acknowledge.
But there is also a shorter one: Request, Acknowledge.
With a request, the device can request the same IP address.
When a device is booted, it always does the full DHCP communication. That's why it's more likely to get a different IP address.
SANS ISC Senior Handler
Microsoft MVP 2011-2016 Consumer Security, Windows Insider MVP 2016-2019
If you send me messages, per Bleeping Computer's Forum policy, I will not engage in a conversation, but try to answer your question in the relevant forum post. If you don't want this, don't send me messages.
Stevens' law: "As an online security discussion grows longer, the probability of a reference to BadUSB approaches 1.0"