You'd look it up in a guide book, or contact the tourist information office for the place you're visiting. Later, some of this was online, and even later there were websites for the bookings.
Earlier, you might have to write letters. I remember my mum describing doing this when she travelled to the Eastern Bloc — she had to write letters to the tourist office, then follow up by letter to make the booking. It might have been necessary to write in German or Russian.