When we give a positive feedback to the opamp, it no more behaves as a linear IC. If the input voltage difference (i.e Vp-Vn) is greater than 0, then it gives a +Vsat output and if the input voltage difference is lesser than 0V, it gives a -Vsat output.
This is the idea behind the Schmitt trigger. Now the output of the opamp is fed back to the non inverting terminal of the IC. This is used to control the upper and lower threshold voltages in the case of a Schmitt trigger. To vary the duty cycles, we use diodes and more resistors.
Schmitt trigger can also be done on devices like 555 timers and bipolar junction transistors (BJTs).