There is an overwhelming amount of MIDI software available for Windows, as the virtualization of the music production industry has really been rapidly progressing over the past few years.
A MIDI sequencer is typically what is used to sequence notes into a song. The biggest and best include: Cakewalk SONAR, Steinberg Nuendo and Cubase SX, Ableton Live, and Magix Samplitude. There are many variations of these applications based on your level of
need, and the prices range between less than $100 and over $1000. For example, Cakewalk's Kinetic retails at around $100 or less, but it offers only a tiny fraction of SONAR's capabilities.
Recently, powerful "budget" sequencers have been popping up as well, such as Mackie's Tracktion.
Free, basic MIDI sequencer or host applications also exist, and you could probably write your own if you studied the audio and MIDI portions of DirectX.
All of this said, MIDI by itself is just data, and you need a synthesizer to turn the data into audio that you can hear. Of course, Windows comes with a very generic MIDI synthesizer, but the trend in audio software is to use so-called "soft synths", or virtual
instruments, to produce audio from incoming MIDI messages.
These virtual instruments come in the form of plug-ins for the aforementioned sequencer host applications, and the sheer number available on the market today is mind-boggling. Many of these plug-ins are extremely high-quality, making your simple MIDI keyboard
sound like a real Boesendorfer piano, for example.
The definitive site for learning about soft synths and downloading free or trial versions is:
However, I highly recommend checking out the demo versions of the other MIDI sequencers mentioned earlier. The Cakewalk applications are all very good and play well with Windows (in particular, Project5 v2 is very easy to use and comes with great sound libraries)
and have very helpful support forums, although you might also want to demo Tracktion since it is aimed at making things easy for beginners.
Just a word of caution, though: once you get into computer-based music production, you'll soon discover that there is so much to learn, and it could end up stealing away your time from coding. Consider yourself warned!