Hostels can range from completely disgusting holes to rooms like a typical hotel. Most will be a number of beds thrown in a room bunk bed style. Some are coed others single sex and a few are both. There is usually a choice as to how many beds to the room the less the more expensive. There may be a bathroom but usually not, usually there will be a common bathroom and often times separate shower room. The hostel will usually provide sheets and almost always a pillow, some charge extra so its best to bring a sleep sheet. Be prepared to hear lots of snoring (and at party hostels other things) or have various objects thrown at you if you are a bad snorer yourself. Here are some pointers about Hostels:
Get there early or book ahead. Hostels tend to fill up fast, especially in the summer. If you are going into a town/city late call in advance for a room. Looking for a bed at midnight after an eight hour train ride can be quite a chore.
There are several ways to find a hostel. The easiest is using a guidebook. Nice and convenient and gives you an idea of what to expect. The downside is that every one else is doing it this way too, so those hostels fill up the fastest and tend to be more expensive. You can arrive at a train station, hostels often send people out to bring backpackers in and if you have a giant backpack on your back, its like a "come ask me to stay at your hostel" flag. Another way is to plan way in advance and book online before you go. This is nice because you'll always have a bed, but it takes a lot of the spontaneity out of the trip.
You don't have to stay at a hostel. Of course there are hotels which are usually more expensive but its nice to get some alone time every once in a while. You can camp, which is much cheaper but offers less amenities. You will probably come across people who will rent you a room out of their home too. And if you feel like really roughing it (but nice and free!), sleep on a beach or in a phone booth (been there).
One piece of advice I've yet to see in a guidebook, if you want to meet people, go to a hostel with a bar. There is no easier place in the world to meet people than a hostel with a bar.