Internally op amps have frequency compensation (generally a 1-pole LP rolloff starting at a low frequency) so they are stable with resistive negative feedback.
Comparators have no internal compensation so they are much faster in doing the voltage comparison at their inputs, but are unstable (oscillate) with any negative feedback.