Okay, what you're thinking of is a software synth/midi controller, basically a hardware keyboard that controlls the piano/synth stuff via MIDI (musical instrument digital interface).
Something like
THIS would allow you to do so, in GarageBand, however, you would HAVE to have it hooked up to a computer to be able to use it. You wouldn't be able to get any sounds out of it if it weren't.
The ones I mentioned earlier are basically like digital pianos with different sounds, rhythms, kits, etc. By touch sensitive, it means that the harder you hit the keys, the louder the notes will play, it gives you a more realistic feel for dynamics while playing a piano.
Hope this helps!