C++ threads vs JUCE threads - threading tutorials?

this thread is also relevant. To poll or thread or . . . .?

I’m quite confused about the use of critical sections. I understand what they are for, and I understand turning them on and off with a scoped lock, but what is the extent/scope of the critical section itself? what defines what exactly is “critical” ie what gets locked? presumably it is soemthing to do with the scope of the Criticalsecion object, ie where it is initially declared?