For a real-world example, consider the early history of the browser now known as Firefox. The earliest releases were made under the name "Phoenix". The name was changed after trademark claims were made by Phoenix Technologies, a company that develops software but doesn't have any products even remotely related to web browsing (they build BIOS and low-level system software). The browser already had numerous public releases at this point.
The name was changed to "Firebird". This name also eventually received trademark claims, this time from an open-source database project with the same name. The developers eventually settled on the name "Firefox", which didn't have any conflicting trademarks.
These name disputes did not involve court cases, so nobody was ever officially determined to be in violation of a trademark. The trademark owner simply contacted the developers, informed them of their existing trademark, and asked them nicely to stop using a name that conflicted with it. Open-source projects typically have minimal or non-existent budgets. They can't afford to defend against a lawsuit, so a cease-and-desist request is usually honored as quickly as reasonably possible. The trademark owner might technically have the right to sue, but an open-source project doesn't generally have any assets to speak of so forcing them to pay damages is fruitless. A lawsuit is really only useful to force a stubborn project to drop their use of an infringing mark when they won't do it voluntarily. Open source software thrives on community and working with others, so historically such stubborn non-compliance is rare.
Forks, generally speaking, are a bit different when it comes to trademarks. Trademarks for names, branding, etc. are completely separate and independent from the license under which the software is distributed. Most significant open-source projects have explicit language in their licenses that explain this. You may have the right to distribute modified versions of the software, but if you do so you're required to replace the branding with your own. As a trademark holder, that means that the only forks that might also be infringing are those that aren't in compliance with the existing license, which again is not the norm in the open-source world.
Publishing software under a pseudonym doesn't really change things. It makes it a little harder for the trademark owner to figure out who to sue, but that's not a very big hurdle for a company with a legal department. Even without knowing who is behind the software, the trademark owner can submit takedown requests to whatever provider is hosting your repository and/or website.
In the Firefox case, there was a legal entity behind the project (the Mozilla Foundation, a non-profit organization). The Mozilla Foundation owned all the trademarks, branding, and source code copyrights, so the trademark disputes were pointed at them. Many open-source projects are simply a bunch of individuals collaborating without any high-level entity involved. In that case, legal disputes would likely be made against developers as individuals.
As an open-source developer, it's just as important to think about existing trademarks as if you were any other type of developer. You don't want to waste time, money, or goodwill fighting trademark infringement claims. You especially don't want to be forced into changing your project's name if you don't have to. Name changes create confusion for users and undo any name recognition that you've already earned. In the worst case, you could get sued, a judge issues an injunction that prevents you from distributing the software in any form until the case is settled, and the opposing lawyers drag out the process for years. By the time the legal case is resolved and you can get back to work, you will have lost all of your momentum, support, and volunteers. It's better for all involved if you do your due diligence and avoid stepping on anybody's existing trademarks.
You also specifically asked about users of open-source software. Users shouldn't have to worry about trademarks any more than they would with proprietary software. Trademark owners primarily go after those who create or distribute software that infringes their marks. People simply using that software haven't really damaged the trademark owner, so their ability to sue you is limited. Contrast this with patents, where many trolls absolutely will go after the end user. A patent owner can claim the end user damaged them by not paying the royalties that a proper licensee would have paid. Trademarks aren't licensed to the end user, so it's not quite the same situation.