Practice. And practice. Then more practice.
And then some more practice.
Seriously though, meditation needs a structure of consistency more importantly than anything, which is the thing that people really struggle with more than meditation itself, and it's why many people never really seem to get a handle on it.
People can't just sit down once or twice a week and think they'll master meditation eventually, it needs a purposeful pursuit on a daily basis in order to develop efficiently and culminate into a more permanent state of being.
It's like pushing a boulder up a hill, and every day that passes where you don't practice, that boulder starts making its way down without hesitation.
So for many people, every time they go to practice meditation, most of that time is spent making up for regression and lost time, with only minor progression. Like waves on the shoreline, their progress comes and goes with the rhythm of their practice habits, and they just have to hope that they're practicing just enough to make it a little farther each time. Maybe after a few years they'll manage to push their line pretty far.
...... or there's option 2, where you just put your nose to the grindstone for a few weeks and master meditation like a mature Magician.
It shouldn't take the average person more than 2-6 weeks to master any single meditation exercise if pursued in a proper fashion, with 3-4 being the most common from what I've seen.
This isn't just theoretical driveling from me either, it's something I've had to go through myself multiple times throughout my history.
In my case, this entailed the mastery of the three Thought Control exercises as found in the first step of the IIH, which are roughly equivalent to the exercises called Mindfulness meditation, Focal meditation, and Void meditation/Vacancy in the modern occult community.
When I was a late teen, I was a zealous little thing that had no problem mastering the first step of the IIH and the aforementioned exercises within the span of a few months. I was practicing every day, with no less than 10-20 minutes for each exercise and sometimes practicing the exercise(s) twice a day.
However, I would end up having to do it all over again from the beginning many years later because of my own neglect. I only bothered doing one or two of those exercises every once in a blue moon after I mastered them, and that added up over the years to a point where I had gone almost completely backwards, save for a decent grip of the first Mindfulness meditation.
So again, I strapped in and went through the process, taking about 2-3 months like before.
But then for a second time, years later, my development was the victim of my own neglect yet again and I had to do it all over for a total of three times.
Third time is the charm, luckily, and I've gotten it through my thick skull to maintain my developments after I have mastered them.
But it should be mentioned that it isn't a ruthless up-hill battle forever.
Once mastery of a meditation exercise is accomplished, you'll reap a near-permanent shift in your mental being that follows you through your every waking moment. And as long as you maintain that status quo with a modest degree of scheduled practice, you won't have to worry about that progress going out the window if you miss out on a few days or w/e.
It takes serious neglect, like what was done in my case, to regress once you reach this point of mastery.
A quick 10 minutes a day or every-other-day is all it really takes to maintain the mastery of a meditation exercise. And if you've gotten to a point where you've really mastered a meditation exercise in the first place, doing it for a measly 10 minutes a day should be near effortless and those minutes will fly by like the wind.
Essentially, it becomes no more difficult than brushing your teeth every day.

But in order to get to that point, development needs to be taken seriously and not treated as an afterthought, the work needs to get done.