Nowadays, most local area networks have a DHCP server running on them. This is, of course, how hosts on the network are assigned their IP address and other stuff they need to know (router address, DNS servers, etc.).
The DHCP server has a pool of addresses that it is allowed to hand out to clients, and it will often hand out these addresses sequentially. In some cases, the address chosen for a particular client may be based on some sort of hash function on the client’s MAC address (so that the client will always be assigned the same address, unless there is a hash collision).
Of course, sometimes it’s nice to assign a particular device on your network a specific IP address (a “static” or “fixed” IP address). This way, you will always know without any doubt what the IP address or your printer or file server or whatever is. Of course, you can just set the address manually on the device, taking care to place it outside of the DHCP pool.