Let's be very precise about what we're talking about:
A MIDI controller is anything that can send MIDI commands to another MIDI device. Keyboard type MIDI controllers are only one kind. But, for the purposes of this answer, let's assume that whenever we say "MIDI controller" we mean the piano keyboard type.
A MIDI sound module is a device which accepts MIDI commands, and produces a sound. Those sounds could be artificial sounding beeps, realistic sounding simulations of a real instrument, or drums. Let's forget about the other types of sounds, and assume you're interested only in piano sounds.
What you refer to as a "keyboard", I will call a digital piano. It's the MIDI controller, and the MIDI sound module, all in one unit. (It's possible that internally, it's not using MIDI, but that's a detail that's not important). It's common for these to also have MIDI connections, so you can use them standalone, or as a controller, or as a sound module.
MIDI commands can be carried over traditional 5-pin MIDI cables, but nowadays they can also be carried over USB. This is important, because it means that a PC or a Mac -- or even an iPad/tablet/phone -- can become a MIDI sound module. For example, Macs come with GarageBand, which has perfectly acceptable piano sounds that you can play with MIDI. MIDI controllers often have some PC/Mac software bundled.
- You need a controller
- You need a sound module
- You might already own a sound module (your computer)
- You might prefer to have everything in one unit, for convenience
The reason I stress you should think of a digital piano as a sound module and a controller in the same box, is that everything I am about to say about controllers, applies equally whether it is part of a digital piano or separate.
The very simplest controllers are just a row of on/off switches. You hold down a key, and a note plays. You release it, the note stops. You have no control over the loudness of the note. This is OK if you want to sound like early Kraftwerk; it's bad if you want to sound like a pianist.
More sophisticated controllers are velocity sensitive -- the harder (or actually, faster) you hit the key, the louder the note, just like a real piano. To have anything like the control a pianist has, you need velocity sensitivity.
There is also a feature called aftertouch. This lets you change the pressure on the key after the initial strike, to affect the sound. This is not something a real piano has, so if you are only interested in piano sounds, ignore aftertouch.
High end controllers have weighted keys. This is weight in the construction of they key, so it most closely simulates the feel of a real piano keyboard. Cheaper keyboards either abandon all effort to feel like a piano keyboard, or simulate weight using springs.
I think any ambitious learner needs a wide enough keyboard to play two-handed parts, and I think 61 keys is a minimum for that. 88 keys is the width of a real piano keyboard. With 61 keys, you will encounter pieces where you run out of notes and have to compromise somehow.
Some controllers have smaller keys. You want full-size keys.
My own choice: I have a 61 key USB/MIDI keyboard that is "semi-weighted". I think this is a good compromise between cost and realism (I previously played on my family's poorly maintained upright piano). You will notice a difference in feel between this and the piano you are using. The difference probably doesn't matter too much at first. In any case, you will want to learn to be able to play on different pianos. Real pianos vary in feel too.