Well, that pretty much depends on what you already know?
It is preferable to have been playing some music before, so that you know how "things are supposed to be", how various tones are named and how they sound / match together etc.
A piano / keyboard of sorts is also a very good asset to have, allthough I guess a guitar works as well (when composing / improvising together things, that is).
To actually record some music to be used in a game, you need some sort of recording device (these can be downloaded for free here and there; a member here (chunks chunks) even wrote one of his own that you can find in one of the QMidi threads). Then you might want to input your recording from an external source, in which case you have to localize your computers line-in port and find a matching wire, or you do it straight of your computer by the means of some sort of a software sampler.
These are often quite expensive if you want something good though, so if you're really totally new to this, I reccommend you to start out using your soundcards built in GM sampler which works with all free downloadable midi editors (I could advertise QMidi here, which you'll actually find in this very forum), or a tracker like ModPlug or Impulse (these allow you to use your own sound samples, but doesn't really handle sampling all that well. They're free though, and I myself started out with ModPlug after growing tired of the GM bank).
Maybe you want to check up some music theory as well; there's some threads in this forum (I think they're stickied).
But again, tell us where you are and it should be easier to tell you where to go next
Good luck.
"I kören hörs de brummande busarna Björnligan och Gondolen"