Keyboard controllers don't have polyphony, as that is a characteristic or function of sound modules. You can use a keyboard controller to play a sound module having a polyphony of 1 note-- such as a monophonic synth or soft synth-- and you'll be limited to playing one note at a time. You can then use that exact same keyboard controller to play a virtual instrument or hardware sound module having a polyphony of 256 notes and you'll be able to play up to 256 notes at the same time.
When a hardware sound module, soft synth, or other sound source has a specific polyphony that's likely to be used up if you start layering voices together or using sustain to prolong notes long after you've released the keys, then it's up to the sound module to determine which notes will be cut off to free up tone generators for the new notes. As far as I know, it's standard practice for the oldest notes to be cut off.
However, with monophonic synthesizers or monophonic patches it might depend on the notes themselves, sometimes with the user being able to select which "rule" to use, such as giving priority to the lowest note, to the highest note, or to the newest note. For instance, if you were to play three keys at once (i.e., a chord) then you'd actually get just one note, but it would either the lowest key or the highest key of the three, or if the last key pressed has priority then any one of the three keys might be the one whose note is played according to which of the three keys happened to get pressed last.
EDIT -- As far as your question about "Note Off," the controller will send a "Note Off" when you release a key, not before, even if the sound module has to cut off the note early due to limited polyphony. Notice that there's not necessarily a direct correlation between when a "Note Off" event is received and when the corresponding note stops sounding, since a note can continue to sound after the key is released due to things like a long release time on the ADSR envelope, the use of a sustain pedal, an effect such as reverb or delay, etc. And conversely, a note can be cut off before the key is released due to things like a short sustain time and no release time on the ADSR envelope (such as a patch that's designed to play staccato notes no matter how long you hold the keys down), or the sound module cutting the note off so the tone generator that was sounding that particular note can be used to sound a newer note.
EDIT #2 -- I mentioned effects such as reverb and delay, but those don't have a connection to the tone generators per se, since they're applied "after the fact" to the sounds produced by the tone generators. For instance, if you have a delay effect turned on that creates a lengthy echo which repeats many times as it gradually fades, the echoing note shouldn't continue to "tie up" one of the tone generators after the original note has ended, since the echoing delay effect isn't produced by the tone generator.