What it looks like
A user agent for Chrome on Windows looks like this: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36. It contains the browser and its version, the operating system and sometimes the type of device. The home page shows the user agent that your browser sends, next to the details it is derived from.
Why everything says Mozilla
In the early days of the web, websites sent the best pages only to browsers they recognised as Mozilla. Other browsers began to say they were Mozilla too, and then also named the engines of their competitors, so that they would get the same pages. That history is why the string is long and full of names that do not apply.
What websites do with it
A site can adapt its layout to a phone or a desktop, offer the right download for your system, or work around a known problem in a browser. Statistics tools use it to count which browsers visitors have.
It can be changed and it is shrinking
A user agent is only a claim by the browser. You can change it in developer tools or with an extension, and some tools use it to pretend to be another browser. Chrome and some other browsers have also been cutting back on the detail in the string. Sites that need more can ask for it through a newer mechanism, called client hints.
It is one of several things that together can make your browser recognisable. How to hide or change your IP address describes what that does and does not do for your privacy.
Reading a user agent
Take the example above again. Mozilla/5.0 is the historical opening. The part in brackets names the operating system and processor type; Windows 11 also reports Windows NT 10.0. AppleWebKit and Gecko are engine names that are kept for compatibility. Chrome/129.0.0.0 is the actual browser and its major version; newer versions fix the other numbers at zero on purpose. Safari/537.36 is left over from the same history.
Sources and limits
The User-Agent header is defined in RFC 9110 and client hints in RFC 8942. Browsers differ in how much they send and may change it, so an example here can be out of date. On the home page you see what your own browser sends. More on the sources page.