First off, what is a music producer? It's the job of a music producer to bring together all the resources needed to create a complete album of music. This means working with the record label, artists, sound engineers and the recording studio. In movies it's the equivalent of a director and in construction they are like a general contractor. They bring everyone together and oversee the overall vision of a musical project.
The best way to learn the ropes is to find someone that's already a successful music producer and learn from them. There's no set way to go about this so you have to be creative and think outside the box. Not all music producers are going to want an apprentice. Do some research and seek out producers. Ask questions and simply try to win one over.
You're going to need to make some connections in the music business, and the best way to do that is getting a job. You're going to have to start at the bottom and work your way up. Seek out recording studios and record labels and try to find out where they need help. Anything that gets you in the door can lead to something more. Your main goal should be building up as many positive relationships as possible.
You can go to school for music production. The two most well-known schools for getting into the music business are Berklee College of Music in Boston and Full Sail in Florida. They do cost a good amount of money and you're still going to need to do one of the two options above though. A good school should help you with connections and getting a job, but just understand there's no guarantees.
Now it's time to learn more about the skill sets required to be a successful music producer. Mastering all six skills is not required, but lacking any will have a negative impact on your career in the long run.
Having a comprehensive understanding of music is a must. And being well versed in at least one instrument is a great way to get ahead.
Understanding the technical basics of recording music will also really help. Get some microphones and a digital recorder to get started. Try recording local bands and play around with some audio gear.
A good music producer is also a good song writer. You need to know the details of what makes a good song and album. You can take classes to get better at music theory as it's a very academic subject. The more exposure you have to music the better.