Function of KY-037

Hello. I would like to understand in a simple way how the KY-037 sound detection sensor works. I know that inside the sensor there are 3 circuits that I don't understand them well. thank you

Well the simple way is:
the microphone is exposed to sound the analog-output outputs an analog-voltage proportional to the volume of the sound.
The digital output goes HIGH if the volume of the sound is higher than the adjustd threshold-value

But I think this is what you already know.

The explanation that gos deeper than that
means to understand how opeational amplifiers work.

But maybe the websites found by googling
with this keywords will help you understand
best regards Stefan

There are 3 main components on the sensor. A microphone, a potentiometer and a LM393 digital dual comparator chip..

The microphone changes sound energy to electric energy (voltage). The comparator will switch states when the voltage at the input crosses a threshold set by the potentiometer. There are 2 outputs, One analog (continuously variable) from the microphone output. The other signal is digital (HIGH LOW) from the comparator.

I think you want one of these to get the sound waveform, not the loudness.
There are many other different types to get the sound signal.