You simply walk in, say "I would like a library card" and show some ID with your name and address on it and that's it.
Many public library systems in the U.S. have an incredible list of books and services they offer their communities. The ones in the counties near me offer everything from computer classes to maker areas with free 3d printers and other equipment and usually offer many on-line services like ebooks, audiobooks, etc. As a result, they are heavily used and enjoyed. They're highly responsive to children and young users with huge dedicated sections of child and young adult literature and a few even have robust comic book and manga collections!
Even the rural system I grew up using, which had very tiny libraries, were network connected back in the late 80s and you could "order" books or items from anywhere in the system and have it show up in a day. Most central county libraries also contain many historic records going back hundreds of years -- land records, old newspapers, important legal documents, etc. You can't usually take them from the library, but anybody can view them. If anybody wants a legal way to watch movies or listen to music without buying them and for free, just go check out the massive music and movie section at your local library.
The National Library (the Library of Congress) is free, and the most impressive active collection of material I've ever encountered anywhere. It includes everything from 500 year old violins and original composer folios to Graphic Novels.
There are also private (paid) libraries that house special focused collections. Usually certain research libraries for law or medicine. But I've also seen some foreign language private libraries for certain communities when the local system doesn't offer enough in their home language.
I'm actually curious, what other countries have similar systems, and what's the library system like in your home country? The other country I'm the most familiar with has good libraries, but their almost entirely private and usually dedicated to one or two major topic areas. Bookstores seem to fill in the rest.