Meditation is a Buddhsit way. It is based on Sīla (morality), Samādhi (concentration), and Paññā (wisdom). Actually, Sīla prevents the bad behavior at the moment (Tadangapahāna). Samādhi reduces the arising of mental impurities a long time (Vikkhanbhanapahāna). Paññā eliminates the defilements completely (Samucchedapahāna).
In Satipatthāna Sutta, the Buddha clearly pointed out that meditation is the only way for the purification of beings, for the overcoming of sorrow and lamentation, for destruction of pain and grief, for entry into the Noble Path and for the realization of Nibbāna.
The Sutta states the four methods of steadfast mindfulness, namely, contemplating the body (kāyānupassanā), contemplating the sensation (vedanānupassanā), contemplating the mind (cittānupassanā) and contemplating the dhamma (dhammānupassanā). It ends with a definite assurance of fruitful results: Arahatship in this very life or the state of an anāgāmi within seven years, seven months or seven days.
The Bodhirājakumārasutta of Majjimanikaya expresses the five most important necessaries for a meditator. If one wants to practice meditation for achievement of Supreme bliss, he needs the five aspects; (1) A qualified teacher, (2) A firm faith, (3) Good discipline, (4) Real honesty, (5) constant diligence.
The Sabbāsavasutta of Majjimanikaya states the seven ways of overcoming defilements by seeing or understanding (dassanā), control (samvarā), use (patisevanā), endurance (adhivasanā), avoidance (parivajjanā), elimination (vinodanā) and meditation (bhāvanā).
First, we must understand the four noble truths, three characteristics and dependent co-origination. (dassana) And we must control our faculties not to arise defilements. (samvara) Then, the four things, food and cloth, etc, must be used with knowledge (patisevana). Besides, we should be patient to be able to control the environment factors like: cold and heat. Otherwise, defilements will arise in us (adhivasana). And if we face the danger like elephant, we should run away or climb up the trees (parivajjana). We have to reject not to arise desire or anger (vinodana). Finally, we have to meditate (bhāvanā).
The Dvedhāvitakka Sutta of Majjimanikaya explains two kinds of thinking: wholesome and unwholesome. Bhikkhus should practice to see the advantages of engaging in wholesome thoughts and the dangers of unwholesome thoughts.
The Vitakkasaṇṭhānasutta of Majjimanikaya describes five ways of training the mind to overcome unwholesome thoughts during meditation. When unwholesome thoughts come in us, we have to replace with wholesome thoughts. In tthis sutta, thinking is the main problem. If we can stop it, there will not arise any problem.
In Cūḷahatthipadopamāsutta of Majjimanikaya, the Buddha told the Brahmin Jāṇusoṇi the good qualities of the Buddha and his teaching could be fully thankful and understood only when one followed his teaching and practiced as taught by him until the final goal of Arahatship was reached.