Ryokan (旅館) are traditional Japanese inns, and a visit to one is the highlight of a trip to Japan for many. There are two types: the small traditional-style one with wooden buildings, long verandahs, and gardens, and the more modern high-rise sort that are like luxury hotels with fancy public baths.
Since some knowledge of Japanese mores and etiquette is required to visit one, many will hesitate to take non-Japanese guests (especially those who do not speak Japanese), but some cater specially to this group; sites like Japanese Guest Houses list such ryokan and will help you book.
Ryokan are difficult to find in Tokyo and other large cities because they are usually much more expensive compared to modern hotels and hostels. Traditional ryokan are more commonly found in scenic rural areas, and many ryokan have been redeveloped to their original style, particularly by resort chains Hoshino Resorts, whose first ryokan opened in Karuizawa in 1914.
Ryokan have catered to weary travellers since at least 705 AD, which is when the oldest hotel in the world, Nishiyama Onsen Keiunkan in Yamanashi, was founded. Another old ryokan called Hōshi Ryokan in Komatsu was founded in 718 AD, and is the world's second oldest hotel. Such inns also served travelers along Japan's highways.
A night at a ryokan for one with two meals starts at about ¥8,000 and goes up into the stratosphere. ¥50,000 a night per person is not uncommon for some of the posher ones, such as the famous Kagaya Wakura Onsen near Kanazawa. Take the time to research options to choose what's best for you; for the same price, the cheapest room at an upscale ryokan is likely a better deal than the most expensive room at a modest one, as the shared facilities would be nicer. Rates without meals are much cheaper, but also miss out on a large part of the experience, so as a first-timer it's definitely worth paying the premium at least once. Depending on your group, amenities like reservable family baths or private baths attached to your room may be desirable.
Ryokan pricing is virtually always per person, and because futon bedding is flexible, a single room can typically accommodate from one to four people. Children under 12 are usually half-price or free, particularly if you opt out of elaborate meals for them and share your own instead (an extra cup of rice and miso soup will usually be offered).
Literally speaking, a "ryokan" is any inn for travelers. Some establishments with the word "ryokan" in their name are not the luxurious variety at all but guesthouse-like inns (some minshuku are included). The price will tell you what type of lodging it is. See Japan#Minshuku for more information.
Ryokan usually operate on a fairly strict schedule and you will be expected to arrive by 17:00. On entry, take off your shoes and put on the slippers you will wear inside the house. After checking in you will be led to your room, simply but elegantly decorated and covered in tatami matting. Be sure to take off your slippers before stepping on tatami. At this time, staff will ask your preferences for when to take dinner and breakfast, and any choices such as courses (such as a choice of Japanese or Western style breakfast) and drinks.
Free green tea and sweets await on the table (there is a charge for items in the fridge). Enjoy your tea time and relax. There's a reason to eat the sweets: your blood sugar drops when you bathe in the onsen, so the sweets stop your blood sugar from dropping too low. It's also a free sample, so if you like it, you can buy more at the ryokan store.
Before dinner you will be encouraged to take a bath — see Public baths in Japan for the full scoop. But first, you should change into your yukata robe (浴衣), which you wear during your whole stay. It's a simple enough garment: just place the left lapel atop the right when closing it. The other way, right-over-left, is a faux pas, as yukata are closed that way only for burial! If the yukata provided are not big enough, simply ask the maid or the reception for tokudai (特大 "outsize"). If you're chilly, you can add a haori, a traditional coat, which often has long hanging sleeves that serve as pockets.
Once you have bathed, dinner will be served, either in your own room or in a dining room. Ryokan typically serve kaiseki cuisine, traditional meals that consist of a dozen or more small dishes. Kaiseki is very elaborately prepared and presented from carefully chosen seasonal ingredients. There is usually a simmered dish and a grilled dish, which you cook individually, as well as obscure items that most Westerners aren't usually familiar with; by all means ask if you are not sure how to eat a given item. Local ingredients and dishes are also showcased, sometimes replacing the kaiseki experience with oddities such as basashi (horse meat) or a meal cooked in an irori hearth. The food in a good ryokan is a substantial part of the experience (and the bill), and is an excellent way to try some high-class Japanese cuisine.
After you have finished you are free to head out into town; in hot spring towns it is perfectly normal to head out dressed only in yukata and geta clogs, although doing so as a foreigner may attract even more attention than usual. (Hint: wear underwear underneath.) Geta are typically available near the entrances, or available by request from the desk. These wooden clogs have two supports to elevate them from the ground (a necessity in ancient Japan with muddy roads), which gives them a distinctive clacking sound. It takes a minute to get used to walking in them, but they're not very different from Western flip-flops. Many ryokan have curfews, so make sure that you get back on time.
When you return you will find that futon bedding has been rolled out for you on the tatami. (A real Japanese futon is simply a mattress, not the low, flat bed often sold under the name in the West.) While slightly harder than a Western bed, most people find sleeping on a futon very pleasant. Pillows may be remarkably hard, filled with buckwheat chaff. A few Western-style rooms are available in some ryokan, but beds are always singles, and they lack the charm of a Japanese-style room.
Breakfast in the morning is more likely to be served communally in a dining hall at a fixed time, though the high-class places will again serve it in your room after the maid tidies away the bedding. Although a few ryokan offer a choice of a Western breakfast, usually a Japanese breakfast is the norm, meaning rice, miso soup and grilled fish. If you're feeling adventurous, you can try the popular tamago kake gohan (卵かけご飯 "egg on rice", a raw egg and seasoning which you stir into a bowl of hot rice) or the disliked-even-by-some-Japanese nattō (納豆 fermented soybeans, which you stir vigorously with chopsticks for a minute or two until they become extremely stringy and sticky, and then eat over rice).
High-end ryokan are one of the few places in Japan that accept tips — kind of. The kokorozuke system is the reverse of the usual: around ¥3,000 is placed in an small envelope and handed to the maid bringing you to your room at the very beginning of your stay, not the end. Kokorozuke are not expected, and the vast majority of Japanese visitors (95%+) will not give one: the implication of giving one is a sort of apology in advance for causing trouble, perhaps because you have made special requests (e.g. food allergies) or are unable to speak Japanese.
Should you wish to give a tip, you'll need a suitable envelope. They're called pochibukuro (ポチ袋) and are sold in convenience stores. Like greeting cards, there are ones intended for children, weddings, funerals, etc.; choose a plain one to avoid a potential faux pas. If you want to give a tip when you leave, leaving it under your pillow will make them think it's money you forgot to take, so be sure to leave a thank you note explicitly stating that it is a tip. Giving kokorozuke is not common among the Japanese themselves unless there are some exceptional circumstances, so just enjoy your stay and don't worry too much about it.