Just lots and lots of practice. Before touching RGSS (or Ruby for that matter) all the programming knowledge I had at the time was a high school Java class. The basics of programming do help, so if you're completely new to it, I suggest reading up some beginner tutorials on Ruby first. When I made the move over to RPG Maker XP, I really wanted to learn how to script, especially after playing with many of them. It started with minor edits to scripts (like changing numbers or writing text) to adding new features (a couple things I made using BABS) to writing a script on my own (Organized Quest System). You start seeing patterns in people's code and try to replicate them. Once you have a general understanding of what's going on, you start experimenting with what you know and learn as you see its results. After that, it all comes down to memorizing key terms or syntax--you start seeing them so much that it's second nature.
It took me a year of doing this. Playing with various scripts, studying different styles, and lurking various boards for tutorials or script questions. Never did I study Ruby on its own (I honestly had no idea what Ruby was at the time--I thought RGSS was some unique programming language made by Enterbrain) nor did I post a question for help. Hell, even my first post here--which was my first post to any forum ever--was helping someone with a script. I should also add that doing script requests helped me A LOT in learning new things.
But it all boils down to passion. Since game design and programming are important to me, it felt great learning something I wanted to learn. So if the passion is there, everything else comes naturally.
Study. Modify. Add. Create. Contribute.
Just SMACC it!
Yes, I just made this up, bite me