An IP address is a unique address that identifies a device on the internet or a local network. IP stands for "Internet Protocol," which is the set of rules governing the format of data sent via the internet or local network.
In essence, IP addresses are the identifier that allows information to be sent between devices on a network: they contain location information and make devices accessible for communication. The internet needs a way to differentiate between different computers, routers, and websites. IP addresses provide a way of doing so and form an essential part of how the internet works.
To use the internet, all connected devices must have a public IP address. An IP address allows two devices—the sender and recipient of internet communications—to find and exchange information with each other.
The setup is similar to real-life address systems. For example, if you were to subscribe to a magazine, the magazine distributor (the sender) would need your address to send you (the recipient) your copies. Without your address, the distributors wouldn’t know where to send the magazine.
The same applies to the internet. Without an IP address, two devices would not be able to find and exchange information with each other.