What is a koan? Most people with an interest in Zen have heard of koans, but not everyone has a clear understanding of what they are. Most people think of them as being a type of “Zen riddle,” but most of the classic compilations of koan (such as the “Blue Cliff Record”) are anecdotes, not questions.
Some people think the koan is a type of nonsense question designed to shock the mind into enlightenment, but there are right answers and wrong answers to koan questions, so how can the questions be nonsense?
Other people think that since collections of “koan answers” have been published, earning your “Zen master diploma” should be as easy as memorizing all the answers- but trying that with a real Zen master is liable to get you whacked with a stick.
So, what is a koan? Essentially, a koan is a story illustrating some aspect of Zen Buddhist thought. Koans are supposed to be anecdotes about actual conversations between Zen masters, usually in ancient China. All Zen sects devote some time to studying these anecdotes.
The Rinzai sect of Zen- as well as some non-Japanese sects- uses specific lines from some of the koans for meditation. These “koan questions” do function somewhat like riddles, as the disciple is supposed to present his understanding of the koan to the Zen master in weekly interview sessions. Collections of “koan answers” won't help, because the answers aren't definitive- the same answer can be right or wrong on different days. Why? Because the Zen master is really assessing the person giving the answer, not the answer itself.
He can (in theory) tell immediately whether you actually get the point of the koan or not. If you try to give a nonsense answer, you don't get it. If you try to give an answer that shows your intellectual understanding of Buddhist doctrine, you don't get it. On the other hand, if you do get it, there are any number of ways you can show it, some of which might appear nonsensical on the surface.
Rinzai Zen has an entire curriculum based on koan questions- once you've answered them all, you get your diploma. Soto Zen doesn't use them at all. Vietnamese, Korean and Chinese sects of Zen all use them in different ways and contexts.