Semaphore Lock for Dummies

How to do this, I still don't understand