I mostly learned hostel etiquette by staying in lots of them, seeing the nonsense bullshit youth fuckery therein, and being dedicated to being a good hostel roommate. Hostels often have many options and a while a shared dorm-style room is often the cheapest, you can often see a different payment scale depending on the number of people in your room.
A single room for you alone or you and one travel bud is often the most expensive option, but still far cheaper than getting a hotel room. You will often still share a bathroom, living space, and kitchen in these cases. I highly suggest this option if you want the social aspect of the hostel – new international friends to explore with, group rates at tourist attractions – but the privacy of a locked room.
However, the shared dorm room is a great option for a traveler on a tighter budget or longer trip. This is where very specific etiquette comes into play: don’t leave your shit anywhere but your locker and/or bunk, anything that smells should be contained or washed, make sure you have headphones to drown out your roommates’ night noises, and probably don’t eat in there.
When using any shared space in a hostel (patio, kitchen, living space, entertainment space, etc) you should always abide “guest rules” as in – act like a guest in someone else’s space. Don’t leave dirty dishes, don’t put your feet on tables, don’t take up four spots when lounging, sleep in your bunk rather than common space, etc.