I must assume your keyboard has some type of audio output - either 1/4". RCA or mini plug. At very least it must have a headphone out (either 1/4" or mini plug). I must also assume your computer has some kind of sound card.
So you plug a cable with a male jack into the female out of your keyboard with the other male end of the cable into whatever female input of your computer interface (soundcard). You may have to buy some adapters to convert 1/4" to mini plug etc.
You should now be able to send an audio track into your computer - to be converted from analog to digital. I have never used Audicity and I have no idea what your computer setup is.......but since you are planning on recording, I must assume you have some basic analog/digital conversion capabilities and that Audicity can except that type of data.
If you do purchase software that can process MIDI - you would still need to get audio into your computer if you want to create wav files.
MIDI does not create analog sound. MIDI simply tranfers various performance data (note on, note off, etc.). The software records the MIDI data and then sends it back to a MIDI instrument (or to samples). When the MIDI instrument receives the performance data back it then responds by creating the analog sound (no different than if you were pressing the keys on a MIDI keyboard. But - you still need to record that analog sound.