There are 6 preliminary steps:
1. Establish the right mental attitude: Being mindful of the yamas and niyamas, which are the 10 vital principles of living graciously in the world and expanding self-awareness, helps you to compose the mind and establishing the harmony within. The 5 yamas (regulators of yourself) and 5 nayamas (actionables by you) are the 10 commitments of yoga as per Patanjali's Yoga Sutras. The yamas are ahimsa, nonviolence; satya, truthfulness; asteya non-stealing; brahmcharya non-sensuality and aparigraha, non-possessiveness. The Niyamas are saucha, purity; santosha, contentment; tapas, ascetism; svadhyaya, self-study, and Ishvara-pranidhana, surrender of the ego to the higher Self, the God.
2. Relaxation Exercises: Before going into the meditation states, it is advisable to go into relaxation exercises. The first is the corpse posture (Shavasana). Relaxation is of 3 levels, first is with the physical body, second is with internal organs and the nervous systems, and third is with the mind. The yogic exercises are elementary and aim at withdrawing into the subtle body. There are deep breathing exercises Pranayamas.
3. The meditative posture: The head, neck and spinal-chord must be kept in a straight line while sitting in a comfortable posture.
4. Pranayama: You should then do deep breathing exercises, Pranayama for the control of the breath and vital energy and purify the nervous system and the body.
5. Pratyahara: This is control of Gyanendriyas or the 5 senses. The student tries to be "here and now" and mentally withdraws from the other places and becomes aware of the spaces within and experiences the present moments. He then makes a sankalpa, determination, and mentally says with conviction, "I am not the body-I am not the senses-I am not the mind-they are all my instruments. I am the Atman-the soul, I am infinite-I am part of the Super-Soul, the universal mind, The God". Every time the mind wavers outward, the student gently draws it within.
6. Making mind one pointed: Through voluntary attention and concentration the student tries to make the mind one pointed. He becomes aware of his breath, and synchronizes it with a mantra like Sohans, "I am Hans or Soul"
Synchronize the in-breath with "Soooooo---"and Hansssssssss" with the outbreath. Then "Ommm----"and "Hanssssssss". This concentration makes the mind one pointed, and persistent concentration enables one to go further, piercing the conscious and unconscious and expanding the mind to the level of the Super-Conscious.
But one needs the grace and guidance of the Guru.