The Semaphore actions (Lock, Unlock and Reset) allow you prevent (a) multiple triggers of the same macro from executing simultaneously, and/or (b) multiple macros from executing simultaneously.
When you trigger a macro, the Keyboard Maestro Engine takes a copy of it and starts executing it. If you trigger another macro before the first one finishes, that will start executing as well - both will be executing more or less simultaneously.
The normal case is that all triggered macros run simultaneously (or synchronously), although you rarely have multiple macros triggered at the same time.
Most macros are triggered explicitly by the user, and the user expects them to complete before he/she triggers another macro. So macros triggered like this will rarely run at the same time.
But there is another class of macros that operate in the background, most especially time triggered macros. Macros that are triggered independent of the UI and the user's awareness. Typically these will be written so as not to impact the user since the user won't be expecting them to run. So they might be things like backup scripts, or automatic download scripts, or the like. Things that happen in the background, or that wait for the user to be idle before doing stuff in the foreground. Often these sorts of macros run for a significant amount of time.
Occasionally there are cases where multiple macros can be triggered, or the same macro triggered again, before the other macros complete. This can sometimes cause a problem, which needs to be prevented.
The primary purpose of using a Semaphore Lock is to prevent simultaneous macro executions.
The Semaphore actions take a name, and different names can be used for different (independent) locks.
Semaphore Lock can be balanced by a Semaphore Unlock, but a Semaphore is implicitly unlocked when the macro that locked it completes.
Semaphore Reset will forcibly unlock a semaphore and should generally not be used except in very unusual circumstances.