Zazen simply means seated meditation. What type of meditation happens while seated can vary. First of all, to make it a Buddhist meditation (sammāsamādhi - right immersion), other elements of the path have to be present as well.
'And what is noble right immersion with its vital conditions and its prerequisites? They are: right view, right thought, right speech, right action, right livelihood, right effort, and right mindfulness. Unification of mind with these seven factors as prerequisites is called noble right immersion with its vital conditions and also with its prerequisites.'
In case of the bodhisattva path it is similar (MPPS XLV.2.III), for meditation (dhyāna) to be a perfection (pāramitā) it requires the perfection of wisdom (prajñāpāramitā).
The Zen view on the connection between meditation (samādhi) and wisdom (prajñā) is that they are inseparable:
'Meditation and wisdom are of one essence, not different. Meditation is the essence of wisdom, and wisdom is the function of meditation. At times of wisdom, meditation exists in that wisdom; at times of meditation, wisdom exists in that meditation.'
(Platform Sutra, ch 4, BDK ed, p 41-42; T48n2008p352c14-16)
And in the same chapter it is written:
'Good friends, there are also those who teach meditation [in terms of] viewing the mind, contemplating tranquility, motionlessness, and nonactivation. You are supposed to make an effort on the basis of these. These deluded people do not understand, and in their grasping become mixed up like all of you here. You should understand that such superficial teachings are greatly mistaken!'
(p 43; p353a5-7)
The way it is put into practice has various names, one common label is nonthought/no-thought/non-thinking (wunian 無念). Again, from the Platform Sutra:
'Good friends, in wisdom’s contemplation both interior and exterior are clearly penetrated, and one recognizes one’s own fundamental mind. If you recognize your fundamental mind, this is the fundamental emancipation. And if you attain emancipation, this is the samādhi of prajñā, this is nonthought.
What is nonthought? If in seeing all the dharmas, the mind is not defiled or attached, this is nonthought. [The mind’s] functioning pervades all locations, yet it is not attached to all the locations. Just purify the fundamental mind, causing the six consciousnesses to emerge from the six [sensory] gates, [causing one to be] without defilement or heterogeneity within the six types of sensory data (literally, the “six dusts”), autonomous in the coming and going [of mental phenomena], one’s penetrating function without stagnation. This is the samādhi of prajñā, the autonomous emancipation. This is called the practice of nonthought.
If one does not think of the hundred things in order to cause thought to be eradicated, this is bondage within the Dharma. This is called an extreme view.
Good friends, to be enlightened to the Dharma of nonthought is for the myriad dharmas to be completely penetrated. To be enlightened to the Dharma of nonthought is to see the realms of [all] the buddhas. To be enlightened to the Dharma of nonthought is to arrive at the stage of buddhahood.'
(ch 2, p 33; p351a25-b5)
This was summarised by Guifeng Zongmi in the following words:
'When you are aware that all characteristics are void, it is true mind, no mindfulness (wunian 無念). If a thought arises, be aware of it (nian qi ji jue 念起即覺); once you are aware of it, it will disappear. The excellent gate of practice lies here alone.'
(Chan Letter, in Zongmi on Chan, p 88; T48n2015p403a4-6)
The main instruction is included in The Manual of Zazen Practice by Changlu Zongze:
'One must not delve into thoughts (siliang 思量) that arise, whether good or bad. As soon as a thought arises, he must become aware of it (nian qi ji jue 念起即覺). He must always be aware of what arises in the sphere of consciousness without losing clear discrimination, and without becoming dull or scattered. A myriad of years is nothing but one moment of thought, which is neither discontinuous nor continuous. This is the essential Way (or method) of Zen practice. Zazen is in itself the doctrinal gateway of “comfort and ease.” (anle famen 安樂法門)'
(The Baizhang Zen Monastic Regulations, BDK ed, p 256; T48n2025p1143a12-15)
Not delving into good or bad thoughts is related to the instruction given to Huiming by Huineng:
'Do not think of good (bu si shan 不思善), and do not think of evil (bu si e 不思惡). At just such a time, what is Elder Huiming’s original face?'
(Platform Sutra, ch 1, BDK ed, p 25; T48n2008p349b24-25)
So, based on Zongze's manual Dogen wrote his zazen instructions with a little twist:
'Sitting in balance in the mountain-still state (kotsukotsu 兀兀), think (shiryō 思量) the concrete state of not thinking (fushiryō 不思量). How can the state of not thinking be thought? It is non-thinking (hishiryō 非思量). This is the real secret of zazen. Sitting in zazen is not learning Zen meditation. It is the great peaceful and joyful (anraku 安樂) gate of Dharma (hōmon 法門). It is untainted practice and experience.'
(Zazengi, in SBGZ, BDK ed, vol 3, p 226; T2582_.82.0217c08-13)
In the first part Dogen follows a story about Yaoshan Weiyan:
Once when the master was sitting, there was a monk who asked,
‘Pondering (siliang 思量) what so deeply (wuwu 兀兀)?’
‘Pondering an imponderable (busiliang 不思量),’ replied the master.
‘How to ponder an imponderable?’ asked the monk.
‘It is not something ponderable (feisiliang 非思量),’ said the master.
(Records of the Transmission of the Lamp, vol 4, 14.335; T51n2076p311c26-28)
That's how the term no-thought (wunian 無念) became non-thinking (hishiryō 非思量) that is used in Soto Zen for the optimal mental state during zazen. Non-thinking is an interesting choice also because it connects zazen to the realisation of the buddhas as stated in the Lotus Sutra:
'The real intention of all the buddhas in adapting their explanations to what is appropriate is difficult to understand. Why is this? Because I have expounded the teachings with innumerable skillful means and various kinds of explanations and illustrations. Yet this Dharma is beyond reason and discernment (hi-shiryō-funbetsu 非思量分別). Only the buddhas can understand it.'
(Lotus Sutra, ch 2, BDK ed, p 30; T9n262p7a18-21)
And it is also an expression that appears in Sengcan's poem:
'Nothing to linger upon,
Nothing to remember.
Clear, empty, and self-illuminating,
The mind exerts no effort.
This is beyond the sphere of thought (feisiliang 非思量),
Which reason and feeling cannot fathom.
In the Dharma Realm of True Suchness,
There are neither self nor others.
To reach accord with it at once
Just practice non-duality.
Non-duality embodies all things,
As all things are inseparable.'
(Trust in Mind, in A Collection of Selected Buddhist Texts, p 85-86; T48n2010p376c28-377a3)