When the Buddha talks about meditation in the suttas (sutras), he almost always talks about samādhi.
The word samādhi has many nuances. The essence of samādhi is to bring together all aspects of the mind and focus them one-pointedly on the object of conciousness. In English, this can be translated as concentration.
Because we use the word concentration in other contexts as well, people sometimes think very easily about concentration.
For example, you sometimes hear people say that they practice concentration while running or that they have good concentration after breathing a few times or counting their breath a few times.
From a Buddhist perspective, it can be said that these kinds of expressions have something to do with concentration (as a translation of samādhi), but only in a very superficial sense. It is more first step in sati (mindfulness) and does not come close to the concentration the Buddha is talking about in the context of meditation.
In the context of samādhi, the Buddha often refers to the jhānas, usually translated as mental absorptions. These are states of immense mental purity, stillness and one-pointedness.
There are different levels of jhāna, each becoming purer, more subtle and deeper. Underlying the jhāna are a series of mental factors, the jhāna factors, and achieving the various jhānas is in essence less important than developing these factors.
The jhāna factors are: beginning focus on an object (vitakka), persistent focus on an object (vicāra), rapture (pīti), happiness (sukha) and one-pointedness (ekaggatā). The deeper the concentration, the more emphasis is placed on the last factor, one-pointedness.
You develop these mental qualities with samatha meditation. Samatha means as much as calmness but can be seen as a synonym for samādhi.
The reason that these qualities, especially one-pointedness, are so important is because they help us to explore the workings of our own mind more sharply and objectively.
Developing samādhi through meditation is no different than developing research equipment in modern science.
If you just look into the world with your naked eyes, you can only see what is happening in a very gross sense. Based on this gross observation, you make conceptual theories about how things might work.
Look at how a human body is put together for example.
For centuries, many theories about how the body works have been developed based on what can be seen with the naked eye, based on gross observations, and in our present day and age these theories are nothing more than funny and creative excesses.
The knowledge of the human body went through a great development with the advent of the microscope.
If you look through a microscope, it soon turns out that the body has much more detail than you initially thought. There are all kinds of different cells working next to and with each other. With these new insights the theories changed.
However, although more detailed, this too turned out to be only a rough observation.
The more you zoom in, the more you see. Suddenly the cell itself appears to consist of all sorts of separate processes that behave according to chemical principles.
A single cell appears to house an enormously complex interaction between molecules, and all these processes in turn influence the cells around it.
And if, since your are very dedicated reasercher, you zoom in even further, for example on one of those molecules this turns out to consist of all sorts of small building blocks, the atoms, and these atoms in turn consist of subatomic particles.
Maybe you can look even deeper, at the underlying aspects of mass, force, direction and energy that only in combination with each other, if the right conditions are present, become observable reality (note, in a physical reality with more than 10 dimensions).
That is madness, you might think, or at least pure magic! After all, I cannot see any of this with my naked eyes!
Although this sounds almost magical, everything behaves according to laws that are always there. Whether we can perceive them as human beings or not depends solely on the power of our research equipment.
Zooming in to an ever greater level with research equipment is like the deepening of samādhi.
From the superficial concentration that helps in counting breathing to the deep concentration that reveals to us the inner workings of our own mind.