The USB-MIDI adapter works well for me. I have one made by UNO I got for about $50. Some of the recording programs out there are Cubase, Pro Tools, or Cakewalk. They are expensive and do way more than you need. If you do some web research and looking in the discount software bins at stores, you should find something that will suffice for recording a simple single MIDI track. Now that I think of it, the software that came with my USB-MIDI interface included an "Express" version of Cakewalk that does all I need.
When you record a MIDI (musical instrument digital interface) track you are merely creating a code that tells a computer how to arrange it's own built-in sounds to fit the notes, rests, timing and dynamics of what you have played into it. So when you send the file to someone else, it will only sound as good as the piano sound on their sound card. The advantage of MIDI is it is compact and easy to email or use in a web page, but it is not terribly expressive. You can record as an audio track (wav, etc) as xvimbi describes, which will give you more control of dynamics, but will be much larger in file size.
Hope this helps.