The Keyboard is connected to my computer though a midi to USB cable.
And that is in a midi-out plug?
You have selected a Software instrument track, when you are playing the piano? What instrument have you selected? Which octave are using on the keyboard?
Sometimes GarageBand will not play the sound at first, unless you record to the track at least once. Do you see notes in the Track editor for the track appearing, when you press the record button, before you start playing?
To check, if GarageBand is reading your keyboard at all, I'd first try to record to test track, that you can delete later. Show the Track editor while playing.
Also show the Musical Typing Window (⇧⌘K). That should mimic the keys, that you are pressing on your keybord. This way you will see what GarageBAnd is reading from the midi.
If GarageBand reads the notes, but jyou just can't hear anything, set all volume sliders to maximum, try a different instrument, try a different octave.