I'm better at "doing" than explaining, but I'll try.

Ratcheting is a technique used by mtbers to get through and around obstacles when one doesn't have room to make full pedal-strokes. It can also be used for water short water crossings when you don't want to get your feet wet

On the road riders will sometimes ratchet while in doing a trackstand

Coast with your pedals at 9 and 3. Now press the "3" foot back, then almost immediately press the "9" foot forward. It's kind of a rocking motion that can be used to ever-so-gently propel the bike forward slowly.

Hope that helps; perhaps someone else can explain it more clearly.