I would recommend you get a MIDI keyboard with USB capabilities that has some additional buttons and knobs for controlling other MIDI functions besides note-on and note-off. They MIDI keyboard in itself will not generate sound. You would hook it up to your computer (via USB) to a computer running software that would have virtual instruments and create sounds for you through the computer speakers. Most USB keyboards that you buy new have some sort of "starter" license for software. The starter license is not usually full featured but can get you started. There are tons of software packages out there to try from their. They usually have some sort of trial period before you buy them. There are also some freeware ones. Really depends want you want to do with your music from there on what to get in the way of software.
There are also lots of MIDI controllers out there that are not keyboard related that as specifically designed to work with a given piece of software and can programmed to send various MIDI messages through pads, swithches, sliders, knobs, etc.