Short answer
A user agent can include information about browser, version, operating system and sometimes device type.
Why user agents exist
Websites use user agents for compatibility, troubleshooting and statistics. It can help the server understand what kind of client is connecting.
Privacy aspect
A user agent is not a reliable identifier by itself, but together with screen size, language and other signals it can contribute to browser fingerprinting.
Modern changes
Several browsers are reducing details in the user agent and moving toward more controlled client hints to reduce passive tracking.
Common questions
Can I change my user agent?
Yes, some browsers and developer tools can change it, but websites may become less compatible.
Is user agent a cookie?
No. It is an HTTP header sent with web requests.