What is an IP address?
An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication.
An IP address serves two principal functions: host or network interface identification and location addressing.
Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there."
The designers of the Internet Protocol defined an IP address as a 32-bit number and this system, known as Internet Protocol Version 4 (IPv4), is still in use today.
However, due to the enormous growth of the Internet and the predicted depletion of available addresses, a new addressing system (IPv6), using 128 bits for the address, was developed in 1995, standardized as RFC 2460 in 1998, and is being deployed worldwide since the mid-2000s.
IP addresses are binary numbers, but they are usually stored in text files and displayed in human-readable notations, such as 172.16.254.1 (for IPv4), and 2001:db8:0:1234:0:567:8:1 (for IPv6).
The Internet Assigned Numbers Authority (IANA) manages the IP address space allocations globally and delegates five regional Internet registries (RIRs) to allocate IP address blocks to local Internet registries (Internet service providers) and other entities.

What's a User Agent?
A user agent is a software program that can send requests to a web server and receive responses to those requests. This is precisely what a browser does. But there are also automatic programs known as robots that are user agents. Further, web caching servers can send requests to a web server and receive responses to those requests. They generally do this on behalf of other user agents, but could in some cases do it on their own behalf (for example during pre-emptive caching) in which case they would behave like user agents. Seen from the perspective of the web server, all user agents look the same. It is not immediately obvious to the server if it is being visited by a human-driven browser or by an automated retrieval system. So we refer to all of them as user agents.