What can a beginner, with good technical skills and background, do in order to gain the skills and experience necessary for the job?
Volunteer to help your Project Managers out with the planning and PM responsibilities on projects you work on. They can probably use the help, and if you're lucky you'll find someone willing to mentor you.
I've found it useful to take classes in the evening, that way I can volunteer for specific tasks that I'm learning how to do in classes, instead of just making a generic offer to do "whatever you need done." I don't think classes are strictly necessary though. You can pick up a text book on Project Management and start looking for things that interest you.
Good technical skills is a nice starting point. You can get very nice project management experience from voluntary projects and it doesn't really matter how software-related they are. E.g. you will learn a lot about project management from co-organizing a conference and this, paired with some software development knowledge and experience makes a very good mix to start a career as a software project manager.
Another idea is to look for projects where there isn't any strong project management persona. It may be maintenance project where no one really wants to take over PM role as there's fairly little PM work to do. That's an ideal situation to start building your PM experience. Expectations aren't very high and you can do it simultaneously with standard everyday tasks.
One obvious step is to take a class (that can applied to certification once you have experience). The PMP course with PMI is one industry standard example. There are plenty of others of course. The PMP certification does require many hours of on-the-job experience but taking the course is a good first step. Most of these courses tell you stuff you already know but most are also quite helpful in the simple act of formally reviewing and giving language to what you might already be doing, informally. I took PMP not long ago and have found it very helpful in my role as a hands-on PM.
It's crucial that you become acquainted with the world of programming.
I have seen scheduling disasters happen because PM's couldn't tell the difference between compiling, coding and debugging.
The worst case was when the PM believed the programmers that rewriting the core would take a few days. They assumed it was like changing the color scheme on the GUI.
Once you understand what's involved to create something from code, then read the other answers about how to become a good PM.
A PM needs basic knowledge- and even elementary skills - in the field they PM, if they really want to do a good job.