If you have a good manager, they'll set you up for success, working with you to create a roadmap to get from IC to Manager. The steps in between would probably entail taking on larger projects, mentoring others, leading a project with multiple developers on it, and then after demonstrating all of that, you get the promotion.
In my experience, you get the promotion when you're already doing the job. In other words, you do the work and the promotion is recognition of the work you're already doing.
The other thing I'd say is that you don't get what you don't ask for. If you want to be a manager, ask for it. If you want more responsibility, ask for it. If you want better compensation or a new title, ask for it.
Unless you have a FANTASTIC manager, you will never just magically be recognized for your work. They will assume you're happy doing what you're doing and focus on greasing the squeaky wheel. To further your career, you should be a little squeaky. Ask for what you want. If you can't get it now, ask for help getting to that point.
I, as a manager, really appreciate it when someone gives me direction on what they want. Otherwise, I have to guess or try to pull it out of them, and I feel like I'm pulling teeth. It's hugely beneficial for a manager to have proactive direct reports. Be that person.
OTOH, I’m also surprised by the number of managers who (1) implement something because “my friend at <massively successful co> uses <tool/process etc>; (2) don’t understand that their colleagues have lives outside work; (3) don’t realize that they’re being partial to some folks; (4) take advantage of the “meek” contributors; (5) don’t protect their team from upper mgmt when needed; (6) don’t do the grunt work when needed (and it’s always needed) etc.
In other words, just like any relationship, as you say.