What causes those oscillations in a comparator circuit
Comparators need hysteresis (positive feedback) or need to be designed to be stable in the linear region.

Real signals are noisy and will jump above and below the comparator thresholds or hang around in the linear region and cause those oscillations. That's probably why you're getting oscillations on your output waveforms.

Oscillations on your input waveforms might be due to insufficient decoupling at high frequencies while the comparator is going crazy in the linear region.