Vivekananda taught “how to meditate” too. In a lecture delivered at San Francisco on 5 April 1900, he told—
First, to sit in the posture In which you can sit still for a long time. All the nerve currents which are working pass along the spine. The spine is not intended to support the weight of the body. Therefore the posture must be such that the weight of the body is not on the spine. Let it be free from all pressure.[Source]
From Swami Vivekananda’s book Raja Yoga, Chapter: The First Steps—[Source]
Sit in a straight posture, and the first thing to do is to send a current of holy thought to all creation. Mentally repeat, “Let all beings be happy; let all beings be peaceful; let all beings be blissful.” So do to the east, south, north and west. The more you do that the better you will feel yourself. You will find at last that the easiest way to make ourselves healthy is to see that others are healthy, and the easiest way to make ourselves happy is to see that others are happy. After doing that, those who believe in God should pray — not for money, not for health, nor for heaven; pray for knowledge and light; every other prayer is selfish. Then the next thing to do is to think of your own body, and see that it is strong and healthy; it is the best instrument you have. Think of it as being as strong as adamant, and that with the help of this body you will cross the ocean of life. Freedom is never to be reached by the weak. Throw away all weakness. Tell your body that it is strong, tell your mind that it is strong, and have unbounded faith and hope in yourself.
In the book Raja Yoga, he wrote—
Dhyana (Meditation) is spoken of, and a few examples are given of what to meditate upon. Sit straight, and look at the tip of your nose. Later on we shall come to know how that concentrates the mind, how by controlling the two optic nerves one advances a long way towards the control of the arc of reaction, and so to the control of the will. Here are a few specimens of meditation. Imagine a lotus upon the top of the head, several inches up, with virtue as its centre, and knowledge as its stalk. The eight petals of the lotus are the eight powers of the Yogi. Inside, the stamens and pistils are renunciation. If the Yogi refuses the external powers he will come to salvation. So the eight petals of the lotus are the eight powers, but the internal stamens and pistils are extreme renunciation, the renunciation of all these powers. Inside of that lotus think of the Golden One, the Almighty, the Intangible, He whose name is Om, the Inexpressible, surrounded with effulgent light. Meditate on that. Another meditation is given. Think of a space in your heart, and in the midst of that space think that a flame is burning. Think of that flame as your own soul and inside the flame is another effulgent light, and that is the Soul of your soul, God. Meditate upon that in the heart. Chastity, non-injury, forgiving even the greatest enemy, truth, faith in the Lord, these are all different Vrittis. Be not afraid if you are not perfect in all of these; work, they will come. He who has given up all attachment, all fear, and all anger, he whose whole soul has gone unto the Lord, he who has taken refuge in the Lord, whose heart has become purified, with whatsoever desire he comes to the Lord, He will grant that to him. Therefore worship Him through knowledge, love, or renunciation.[Source]
In the Alameda lecture (details above), Vivekananda suggested one should train (her/him)self slowly gradually. One needs to practise meditation on a regular basis.[Source]
How is it to be attained? In a dozen different ways. Each temperament has its own way. But this is the general principle: get hold of the mind. The mind is like a lake, and every stone that drops into it raises waves. These waves do not let us see what we are. The full moon is reflected in the water of the lake, but the surface is so disturbed that we do not see the reflection clearly. Let it be calm. Do not let nature raise the wave. Keep quiet, and then after a little while she will give you up. Then we know what we are. God is there already, but the mind is so agitated, always running after the senses. You close the senses and [yet] you whirl and whirl about. Just this moment I think I am all right and I will meditate upon God, and then my mind goes to London in one minute. And if I pull it away from there, it goes to New York to think about the things I have done there in the past. These [waves] are to be stopped by the power of meditation.
Slowly and gradually we are to train ourselves. It is no joke — not a question of a day, or years, or maybe of births. Never mind! The pull must go on. Knowingly, voluntarily, the pull must go on. Inch by inch we will gain ground. We will begin to feel and get real possessions, which no one can take away from us — the wealth that no man can take, the wealth that nobody can destroy, the joy that no misery can hurt any more. …
In Chapter 6 of the Bhagavad Gita, Krishna describes the Practice of Meditation:
(The Bhagavad Gita, 6:10-27)
A yogi should always try to concentrate his mind, retiring into solitude and living alone, having subdued his mind and body and got rid of his desires and possessions.
In a clean spot having fixed his seat— a firm seat, neither too high nor too low— and having spread over it kuśa-grass, and then a deer skin, and then a cloth, And sitting there, he should practise yoga for the purification of the self, restraining the activities of his mind and senses, and bringing his thoughts to a point.
He should sit firm, holding his body, neck, and head erect and still, and gaze steadily at the tip of his nose, without looking around.
Completely serene and fearless, steadfast in the vow of a brahmachāri, disciplined in mind, and ever thinking on Me, he should sit in yoga, regarding Me as his Supreme Goal.
Keeping himself ever steadfast in this manner, the yogi of subdued mind attains the Peace abiding in Me— the Peace that culminates in Nirvāna.
Yoga is not for him who eats too much nor for him who eats too little. It is not for him, O Arjuna, who sleeps too much nor for him who sleeps too little.
For him who is temperate in his food and recreation, temperate in his exertion at work, temperate in sleep and waking, yoga puts an end to all sorrows.
When the well-controlled mind rests in the Self alone, free from longing for objects, then is one said to have attained yoga.
“As a lamp in a windless place does not flicker”— that is the figure used for the disciplined mind of a yogi practising concentration on the Self.
That in which the mind, restrained by the practice of concentration, rests quiescent; that in which, seeing the Self through the self, one rejoices in one’s own Self; That in which one knows the boundless joy beyond the reach of the senses and grasped only by the understanding; that in which being established, one never departs from Reality;
That on gaining which one thinks there is no greater gain, and wherein established one is not moved even by the heaviest of sorrows—
Let that be known as yoga, which is severance from the contact of pain. It is to be practised with perseverance and with an undaunted mind.
Renouncing entirely all the desires born of the will, drawing back the senses from every direction by strength of mind, let a man little by little attain tranquillity with the help of the buddhi armed with fortitude. Once the mind is established in the Self, he should think of nothing else.
Let him withdraw the fickle and unquiet mind from whatever causes it to wander away, and restore it to the control of the Self alone.
Supreme Bliss comes to the yogi whose mind is completely tranquil and whose passions are quieted, who is free from stain and who has become one with Brahman.
– The Bhagavad Gita, 6:10-27