Traditionally, this is a very short story which seems to make no sense which is given to a student of
Zen Buddism by his teacher to meditate on. The teacher may also continuously demand explanations of the apparently incomprehensible from the student. When the student comes up with an answer his teacher will accept, he is given another
koan.
Some Buddists who are not Zen Buddists have suggested that this procedure is necessary for those whose minds are more likely to interfere with enlightenment, and the more fortunate are those who do not need it.
More broadly in modern usage, this it any very short story or parable which does not seem to make sense at first, but bears thinking about. For instance, there are hackers who enjoy some AI koans.