A keyboard is a musical instrument with keys that produce sound, while a MIDI controller is a device used to control other instruments or software through MIDI (Musical Instrument Digital Interface). While both can be used for music production, a keyboard typically has built-in sounds, while a MIDI controller relies on external sound sources.