there's no one way to "get good" but i'd suggest studying music theory as much as you can so you can better understand how to write and structure your music.
Just like JOwen said, no specific way to get good, but if you want to be as good as SMB you should most definitely study music theory (I don't).
You could just listen to other music and get inspiration, which is another thing that I do, but if that does not work as well, something that works 50% of the time is to invert or reverse something.