The wind was flapping a temple flag, and two monks started an argument.
One said the flag flapped, the other said the wind flapped;
they argued back and forth but could not reach a conclusion.
The Sixth Patriarch said, "It is not the wind that flaps, it is not the flag that flaps; it is your mind that flaps."
The two monks were awe-struck.
It is not the wind that moves; it is not the flag that moves; it is not the mind that moves. How do you see the patriarch?
If you come to understand this matter deeply, you will see that the two monks got gold when buying iron.
The patriarch could not withhold his compassion and courted disgrace.
Wind, flag, mind, moving,
All equally to blame.
Only knowing how to open his mouth,
Unaware of his fault in talking.
The story in this koan is from the Platform Sutra of the Sixth Patriarch. If we read this sutra we learn that Hui Neng the Sixth Patriarch was not actually a recognized teacher at the time of this story. He had been in seclusion practicing on his own for 10 years, deepening his realization as per the instructions of the Fifth Patriarch. He comes into town to listen to a traveling teacher when he encounters these two monks. What he said to these two monks seemed so astounding that the traveling teacher asks him if by chance he is the the fellow who is the lineage disciple of the Fifth Zen Patriarch. When Hui Neng says yes, he is asked to give his first public talk and begins his teaching career.
On reading this koan one might think the Sixth Patriarch is simply admonishing the two monks for what seems a rather stupid argument but then what he said might not have struck anyone as so astounding. During the time of Hui Neng (7th Century) Buddhism was a highly intellectual endeavor. A large Buddhist cannon had been translated and was earnestly studied but only Zen, which was a small school, had a lineage of teachers which went all the way back to the Buddha. And Zen was and is not an intellectual discipline but a meditative discipline. These arguing monks were not of the Zen sect so maybe they were surprised to be admonished. And then maybe this "mind flapping" thing was Hui Neng saying the movement of the flag/wind was all in our heads? Was this a statement of the idea that everything is in our heads which is one understanding (not mine) of the Mind Only School of Buddhism? Or maybe he was talking about the Universal Mind which contains all our minds.
Our individual minds are capable of weaving a practically impenetrable jungle of thoughts. Rarely do we see clearly but are instead filled with confusing thoughts. The Buddha recognised this as a primary cause of our suffering. We might respond that it is only some of our thoughts that cause suffering. Yes, some of our thought make us happy but the Buddha and I would respond that for almost all of us we have woven with our thoughts an inherently incorrect understanding and can never be truly happy with this incorrect confused understanding of the world. Now of course you want me to write what is true and real, something you can believe in. But that is not the Zen way. The Zen way is not to replace one set of ideas with another. That may happen eventually. But what is true and real in Zen is the practice. It is Zazen (sitting meditation), Kinhin (walking meditation), and fully engaging body and mind in whatever we do without any extra thought (daily life practice). It is the Eightfold Way of the Buddha and the Six Perfections. All of this stuff is to slowly disentangle the confusion of our thought so that we can see clearly.
Be careful with the first step on the Eightfold Path of Right Understanding. Please don't just substitute the theological edifice of some sect of Buddhism for what was your previous way of thinking. The Buddha laid out only some simple truths which are hard to deny, the truth of our suffering, that everything is in constant change, that everything and everyone, is interconnected by and results from cause and effect (what the Buddha called "causes and conditions") The one really difficult idea laid out by the Buddha and is the non-atman or no-self doctrine. It is completely antithetical to the way most of us think. My suggestion is that we ponder this idea but that again it's true understanding can only be revealed through deepening practice.
Back to the koan, contemplating this story and our "flapping mind" we are asked to disentangle any ideas we might have about our sensory and intellectual connection we have to the physical world. We do this not as an intellectual endeavor but rather by experiencing this connection in it's raw form before any ideas are added to experience. This is not easy and can take years of work in meditation. We are like scientists who should if they are good scientists not take any theoretical idea as an absolute truth but rather test and retest in various conditions all theoretical ideas. In the practice of meditation we are performing a repeatable experiment, that many thousands of people have already performed so that we can learn the truth ourselves of our relationship with the world we live in.