There are a few different ways to grab an IP address, but the most common is through a process called Dynamic Host Configuration Protocol (DHCP). When a device connects to the network, it requests an IP address from the DHCP server. The DHCP server then assigns an address to the device from its pool of addresses. If another device on the network already has that IP address, the DHCP server will assign a different address to the new device.