This is one of the first cultural items I learned upon moving to Zürich from Bordeaux. The tramway system in Bordeaux was brand-new, so the social rules were still sort of in flux. There were cute little zoo animal posters inside illustrating how to make everyone's ride more pleasant (eg. retract your quills and backpacks, avoid loud cell-phone conversations). People were willing to make an effort, but the entry and exit procedure was still a little chaotic, like they didn't really have it down. Yet. Not like in Switzerland.
Rule #1: When the tramway (or bus or commuter train) stops, you walk up to the door and stand beside it, forming a bit of a wedge-shaped line on the platform or sidewalk whose apex is just beside the doorway.
Rule #2 important: Do not block the doorway of the tram. at all. Every single person getting off the tramway must have a clear path straight ahead in order to exit. If there's a crowd coming out and you are blocking someone's exit path (because you're hoping to get on), the exiter won't just squeeze around you (like in France), they'll just walk up to you and wait until you get the hell out of the way. And this will hold up the entire exit/entry procedure. And it will be all your fault.
Rule #3: How do you know when you've screwed up? This is the easy one. You will know. You'll get a (free!) crash course in Swiss tramway etiquette from the school of (polite, furtive) shocked and horrified facial expressions.
I've just learned, however, that #3 is one that actually varies within Switzerland. I had Switzerland's other two fabulous exmo expat ladies over for drinks and jokes, and naturally we ended up comparing notes on Swiss customs. Wry Catcher -- who lives in a smaller city than Zürich -- said that the folks in her town will actually lecture strangers for infractions that are too serious for mere dirty looks. Say, you break Rule #4: Don't even think about getting on until everyone who's getting off is off (even if they're taking a long time and there's plenty of room to go around them). Or you break Rule #5: Do not come running up to the tramway and cut in front of someone who is politely waiting (in accordance with rule #4). You'll get an earful of Switzerdeutsch. And if you try to get out of it by feigning incomprehension, your instructor will gladly (or rather, angrily) give you your lesson in English.
Those stories surprised me quite a bit because it's not like that in Zürich. My experience is somewhat limited since I've been here less than a year, but I love public transportation, so I'm in the S-Bahn (commuter train), tramway, and bus all the time, and -- from what I've seen -- I'd be very surprised to see someone chew out a stranger. Here they have more of a "politeness one-upmanship" thing going, where you silently let people know they've screwed up without ever descending to the level of being impolite yourself.
The incident that really captured Zürich-style politeness for me was one I saw a few weeks ago while I was riding the escalator up from one of the underground train platforms. The escalator has a standing lane and a walking lane, clearly indicated by the yellow shoes painted on the steps. Yet, up ahead, I saw two ladies standing abreast in flagrant violation of what I'll call Rule #6: no standing in the walking lane. This wouldn't be a problem except that some guy was coming up behind them in the walking lane and clearly wanted to continue. Rather than saying something or trying to squeeze around the offending lady, he just leaned forward -- ever so slightly in her space over her left shoulder -- in hopes she'd see him in her peripheral vision and catch a clue and get out of the way. But she never did notice. She just continued conversing with her friend as the guy repeated his subtle leaning-in hint several times as we all rode up to the top. (Personally, I was standing in the right lane, so this situation didn't concern me except for the chuckle factor.) At the top we all filed off, and Lady Wrong-Lane was none the wiser about her infraction.
(Actually this story kind of contradicts my Rule #3, but perhaps it should have an addendum: "You will know unless you're totally oblivious to social cues.")
As amusing as this restraint is, it can actually get to be a little annoying to have to constantly keep a (peripheral) eye out to make sure you aren't blocking (hence inconveniencing) someone. I kind of miss the French system where (when things get crowded) you can just say "Pardon" as you squeeze your way through. "Pardon" is a convenient all-purpose word that can mean "I'm genuinely sorry I bumped you," and can also mean "FYI -- you're in the way -- coming through," depending on the tone and context. My two expat friends assured me that this is just a Zürich thing and that there really is an equivalent word in Switzerdeutsch, but I haven't learned it because it seems like here you just don't bump people no matter how crowded the trains or the aisles of the little city shops may be.
Then, of course, there's Rule #7: Keep your kids well-behaved.

Nico is demonstrating correct tramway procedure
Some conversation is fine, but letting your kids run around, yell, scream, and generally bother people is not okay. Oh, and the parent is responsible for ensuring that the kids follow rules 1-6, and all of the other hundreds of rules. (Actually, I think I'm going to have to give up on the numbering because I don't think I'll succeed in getting a comprehensive list.)
Sometimes when my kids are being a little rowdier than they should, people turn and smile, as if to say "It's okay, kids are like that, and the tramway's not too crowded today." But it really is an indulgence that they're granting you because they can just as easily turn and give you that horrified look that says "The nerve of some people! In my day children were polite!" Parents here catch their kids immediately and give a quick but firm lecture the second the child might be bothering someone. It seems like it's as much for the benefit of the bystanders as for the kid, as if to say "Don't worry, I've got it under control." It may be my imagination, but it seems that the minorities are quicker about it than the white people, quieting the child and then looking up and around with the smile that says "See? under control" since nobody wants to be someone else's example of "what's wrong with those people".
Personally, I don't care that much if I'm giving a bad impression of Americans by scolding my rowdy little boys in American English (though occasionally I'll talk to them in French to give people a bad impression of the French for variety). But I do try to follow all of the unwritten rules as well as I can. After all, they're not just totally arbitrary rules that show off the "good breeding" of the people who are in the know. Rather, for humans (social animals that we are) everyone's ride on the train, bus, or tramway is a little simpler and more pleasant if we know what to expect from the millions of strangers we share the city with each day.