This circuit is
a Schmitt
Trigger, a type of comparator. It measures the input to see
if it is above or below a certain threshold. The threshold varies to
make it less likely that the output will switch rapidly back and forth
due to a noisy input near the threshold.

The input is a noisy 40 Hz sine wave, shown in the first scope. The
threshold is shown in the second scope. The third scope is a graph of
the output versus input. Note that the threshold goes down whenever
the input rises above it, and vice versa.

The two 10k resistors form a voltage divider that put the threshold voltage
(the + input of the op-amp) at 5 V. But, the output of the op-amp is also connected
to the threshold input through a 100k resistor. This causes the
threshold to be raised or lowered slightly depending on the op-amp output.