# When does a semaphore issue a wait and when does it issue a signal?

In my textbook, Operating Systems: Internals and Design Principles (9th Edition) by William Stallings in chapter 5, it explains how semaphores work:

The fundamental principle is this: Two or more processes can cooperate by means of simple signals, such that a process can be forced to stop at a specified place until it has received a specific signal. Any complex coordination requirement can be satisfied by the appropriate structure of signals. For signaling, special variables called semaphores are used. To transmit a signal via semaphore s , a process executes the primitive semSignal (s) . To receive a signal via semaphore s, a process executes the primitive semWait (s) ; if the corresponding signal has not yet been transmitted, the process is suspended until the transmission takes place.

I can't find a description in chapter 5 of when a semaphore would issue a semSignal vs a semWait (which are also sometimes called signal and wait). Can anyone describe the conditions under which semSignal would be issued vs a semWait?