You need to study the topic so you know what good looks like. You need to practice, then evaluate yourself on where you can improve. Then you need to practice again focusing on the specific area of improvement.

And also I wonder how do people create music for game? Write it? Is it easy?

Before learning to compose music, one must learn the basics of a musical instrument, and that alone can take years of practice.

Find a friend who you can work with to record the kind of music you want in your game. If you would like to make your music on the computer

with little skill, you can use Audiotool, which is a free chrome plugin that has virtual synthesizers and drum machines. It still requires basic knowledge of music theory but the skill to physically play an instrument is not required. You can also make music with sampling. Simply take other recordings and piece them together in a way to make something new.

The answer to both gaining skill in art and music: practice and study. Study to learn what makes good art, and practice to develop the technique behind it. With sufficient practice any skill becomes second nature and any technical aspects take on a background role. To a skilled composer, music comes as naturally as speech does for everyday conversation.

The most correct answer is that it depends on you and your innate abilities.

First, I am a programmer who is also an artist (http://l-spiro.deviantart.com/gallery/4844241) and a musician (https://soundcloud.com/l-spiro), and I can tell you exactly how I learned these things. Unfortunately it may not be helpful to you because everyone is different. So the first and most important thing you need to know is not to just take any of our answers as the de-facto way to go for yourself, because what works for us may not work for you, or may work less.

So take from my answers what suits you best and ignore the rest.

Firstly, how did I learn art?
I drew this when I was 12: http://l-spiro.deviantart.com/art/Age-12-Raptor-58293084
Art is an innate ability for me. It is not something I learned. It just happened.Lesson #1: You might just be good at something, like Gabriela Montero at music.
Innate abilities exist and will help you at various levels. Some innate abilities may be stronger than others, so you may have one, but it may be a little weak, or it could be super-strong.
This is something you have to figure out on your own.

I never had to practice at art, but I did have to do some things to make my art better on a technical level.
#1: SLOW DOWN. My ability did not increase, but using that same level of ability over a longer period of time on the same area means the quality of that area increases. If you spend 1 hour on a single square inch, your results will definitely be better.
And speed is one thing you can practice as a technical skill. Speed is important for the workplace as well so you should also try to be as fast as you can, but start off by slowing down and seeing what you can do. Then learn for yourself the trade-off between time and quality.
#2: Put something under my hand in order not to smudge the paper. I didn’t know this when I was 12 and the result of that drawing above is smudge city.
#3: Frankly, the rest of my advice would be similar to #2 and just generic advice you could pick up even with just a few minutes of Google. I can tell you why my drawings are so realistic in detail, in fact, but I have never told anyone those details because I don’t think it is helpful to anyone. It works for me and I understand why. And I don’t think it works for anyone else.

And this reinforces my main point that you have to understand what works for you, not what works for us.

So how did I learn piano/music?
Simple: I invested a lot of time and practice in it. I have absolutely no innate ability in music and am as tone-deaf as they get. I once tried to make a remix of a game song and was listening to the original. Even after clipping the song to just play one note continuously followed be me trying every note on the keyboard to try to find a match, it still took me 5 hours to find the right note.
And when I later released the song, one person listened and not only immediately realized I had missed one note (which I had missed entirely throughout making the whole remix), she even knew the name of the note (she said I had used an F where it should have been an F#).Lesson #2: You might suck at something, but with practice you can at least learn the technical skills for it.

I want to be clear on this, however.
Practice can teach you the technical skills for something. Nothing more.

I can play any song on piano, including Hungarian Rhapsody #2, due to practice practice practice, because playing piano in itself is just a technical skill.

Lesson #3: You can’t learn creativity.

You can learn the technical side of drawing.

You can learn the technical side of music.

You can learn to play any instrument because just playing an instrument is always just a technical skill.

You can learn music theory so that you know some “rules” for composing music. For example a sustained 4th must always be soon followed by a major.

But none of that technical knowledge/skill makes you good at music or art.

I do compose a bit but it’s always very simple work, and usually just lucky that I found a few cool chords.

No amount of hard work is going to change the fact that I am not good enough at music to do game composition.

I can learn all I want about music theory and I can practice all I want at piano.

It’s not going to help because I have 0 innate ability at music.

So this is the most important thing you need to know.

Do you have any ability in art or music?

Do you hear music in your head easily?

Do you see the shape of what you want to draw easily?

These things can’t be learned.

So you can follow all the advice you want and you can practice and work hard, but at the end of the day you may be able to play Hungarian Rhapsody #2 but you will still be a worthless musician, unable to create your own works if you are not currently able to hear new music in your head clearly.

So assess for yourself where you would be if you learned all of the technical knowledge and skills for art or music based on what innate ability you have. Practice only helps on the technical side, but you need some level of innate ability to actually be good at anything, especially if you want to be professional.

Hmmm... I guess you meant to say that about suspended fourth (sus4) chords.

These rules are never immutable. Off the top of my head I can think of one famous example where it resolves differently: A sus4 chord can be followed by a minor chord, as it does in Bach's toccata in D minor (2:44 in this video). I don't have an instrument with me, but I bet it can be followed by the minor or major chord built on the fourth as well, because you can play with the ambiguity of whether this is truly a sus4 chord or an inversion of a sus2 chord.

When these kinds of games are abused they can make a piece hard to listen to, but used in moderation they can add a bit of spice to an otherwise bland composition.