There are various ways to meditate, and it is in a sense really no true way. It obviously helps though to learn from a technique already established but in a sense.
There are generally two main methods used, either one attempts to completely “unfocus” ones mind, or one will attempt do focus immensely deep on one thing.
The latter is a lot easier than the former if you have never practiced meditation before. Breathing focus is a great way to start. What you do is first you find a good calm place, it does not necessarily have to be completely empty from ambient sounds but you should avoid places where there are sudden disturbances.
Also finding a good position to sit is important because discomfort will also draw your attention. Make sure to keep a good posture, straight back, push your hip forward and place your hands in a good position in front of you, important thing about posture is to be able to breathe freely.
Now close your eyes and start breathing deeply, inhale trough your nose, and exhale trough your mouth. Breathe slowly, inhale, then try to hold the breath for a while before you exhale. The goal is to simply focus as deeply as you possibly can on this breathing pattern, as you practice you will get good enough at focusing on your breathing that you block out stray thoughts.
A helpful aid is to visualize the breathing pattern. Breathing along a box is a very good method, which sounds a bit abstract so I will explain it
Basically visualize a rectangle, two long sides, two sides that are about half as short as the long ones. When you breathe in, imagine breathing in along one of the long sides, as you slowly breathe in visualize your breath traveling along the side until you can’t inhale anymore and your breath is at the corner. Now visualize holding your breath along the short side, continue seeing your breath traveling along the short side of the rectangle as you are holding the air in. When you reach the other long side, start exhaling all along that side, to then hold again at the other short side before beginning again. Basically your breathing is traveling around the rectangle over and over again.
This is really helpful especially if you are new to meditating because it will help you center your mind.
How long you do this is really up to you. Try to aim for 15 minutes the first times and then extend it.
Now this is just one method of meditation but I’m explaining it since its a very useful one if you are new.