Nonchord tones
A nonchord tone is a melodic note outside the harmony sounding at that moment.
The line keeps moving
Over a C-major chord, D is not one of C–E–G, yet C–D–E can be a perfectly clear melodic motion. D can act as a passing tone between chord tones. Other notes may approach and leave from the same direction, hang over from an earlier harmony or anticipate a later one.
Try one note between
Hold C major and play E–D–C, first with D short, then with D long. The pitch is unchanged; its timing alters how much attention it demands. Next change the chord to G while D is held. D becomes a chord tone in the new harmony. Listen to how the bass changes its status.
Do not “correct” every mismatch
A piano-roll note outside a chord is not necessarily wrong. Check whether it connects a phrase or creates a desired rub. If it sounds accidental, change its duration, accent or neighboring notes before deleting it.
Related entries
Further reading
These source links provide technical background; the exercises above are Eidolon's own editorial guidance.