The meditation that we are mostly used to, if not by practicing, at least by hearing about it, has its roots in India, and it's 5000 years old. This is where the wise yogis were practicing it based on the Vedas, which are the first Indian scriptures found.
The Hindu tradition said that the Vedas were not conceived by humans, because they have been revealed to them during deep meditation.
The more advanced forms of Vedas are the Tantras, which are a known to be a later development within Hinduism, along with Buddhism and Yoga. However various Hindu schools also say that the Tantric teachings are as ancient in the history of meditation as the Veda itself.
Yoga meditation in its classical form speaks about completely withdrawing from the material world to merge instead with the higher consciousness.
Yogis were using the asanas (the yoga positions) to prepare the body, after which they were removing any distractions from the external world while focusing on a particular mantra to achieve a state of consciousness called Samsadhi.
This was the state where the yogi would merge with the consciousness and completely separate from the material world.
Buddhism and Buddha
Buddha is the biggest name associated with meditation in the past as well as today, and the Buddhist meditation is maybe the best known technique even today. His teachings have become popular in the Eastern world, however eventually each country adopted their own meditation techniques of practice.
Buddha started out with yoga as well, but eventually he came to the conclusion that simply rejecting the material world entirely is not the way to find full understanding and enlightenment.
So he changed his way of meditation by simply sitting under a tree and focusing on his mind. This allowed him to enter a deep state of meditation that lasted for several days and nights.
When he woke up, he knew, he understood the nature of existence. This is why he is called Buddha, which means 'the awakened one'.
Buddha showed us that we don't have to reject the material world, but merely to understand that it's not permanent. He showed us that we need to understand that all external things change, including our thoughts.
By eliminating fear, worry, anger and other negative thoughts from our mind, we are learning to become truly happy and spiritual in nature.
While this practice has taken a specific format in various countries, the general idea of meditation does draw its roots from the teachings of Buddha.
Continuing the history of meditation journey, it also spread in the Middle East starting various sects such as the famous Sufi, the Sunni, Shiah and Baha'i. In Judaism, it started with Abraham, who is the founder of Judaism. It is also found in the old testament.