OK, IT student so you can get the detailed answer
. IP addresses are assigned by something called a
DHCP server, in most houses, it's the router. When a PC starts, it broadcasts a DHCP request (because it doesn't have a network configured, it cannot do otherwise), the DHCP server catches it and sends a reply; this reply contains, among other things, the IP address. The DHCP linked the given IP to the MAC address of the requester and this IP address comes with a "lease time", when it expires the DHCP might reassign this IP to another PC. If the same PC does a 2nd DHCP request within the lease time, it might be reassigned the same address. Some router support features such as assigning a STATIC IP to a specific MAC address (necessary when you want to run a server behind a router). I think a device can also send an explicit "release" of the IP to the DHCP so it can reuse the IP before the lease expires.
In windows, to get a new IP address, you can probably just open a command prompt (DOS screen) and type:
There is a lot to learn about networking if you are interested, it is incredibly complex without being overly complicated. You just need to understand the way protocols encapsulate one another.