Learn the basics first. This includes things like (obviously) learning how to read notes, learn to sequence if you're doing digital music or learn to play piano (optional, choose an instrument that best suits you), among other things.
The mindset I always follow is to compose based on mood. Music can tell a story, and that's important to games, too. I have to get the look and feel of something before I compose for it, and it helps me greatly when I am setting a tone for my compositions.