Working for promotions has been in a couple ways. This is probably another whole editorial ;), but I'll give a few examples.
If I wanted a manager's job, I'd look for ways to help a manager out and learn their job. Propose a budget, help them get their budget done, add in some responsibilities for management to show them I can do the job. This sometimes has gotten me a promotion where I worked, other times it's helped me to get a job elsewhere.
If I wanted a technical promotion, then it depends. Some places defined what was needed for the next level. It might include certification, which meant a significant period studying on my own. It might be that I wanted to be in another department. I had a "side project" that I hacked at for one department when I was a sysadmin. I wanted to get into programming, so I really dug into it, got a lot of work done, and even though the corporate programmers complained about department apps, I would show them what I'd done, ask opinions, ask what I could to do make it conform to their standards, give them the source code updates for their VSS, and let them (and their manager) know that I wanted to move to that department. It worked.
One thing I've done is make sure that managers or directors knew that I wanted to get promoted. I'd ask them what they wanted me to do, and then find ways to show them I was going beyond what was expected. Find ways to help out, don't complain, or even take on jobs that no one wanted to do, to get them done and show I was willing to work for the company.
Of course when I was happy where I was, I was less likely to volunteer for extra work, complain a bit, even avoid work where possible. That didn't work at Peoplesoft. I dodged two promotions before I got stuck managing people 🙁