Neuromodulators are secreted from the boutons and axonal swellings of certain nerve cells (so-called varicosities) straight out to the extracellular space (volume transmission as opposed to synaptic transmission) where the modulator substance spreads out and remains with retained properties for a relatively long time.
A neuromodulator can therefore affect larger or smaller groups of neurons, have a "global effect", for several minutes (unlike the synaptic transmission's extremely short-term "local" effect of only a few milliseconds [1/1000 sec.]).

Under the influence of the neuromodulator, the way nerve cells respond to synaptic stimuli is "modulated".

As an example, one can imagine a group of nerve cells that, when they become active, trigger a feeling of sadness and excitability.
Under "normal" conditions, the cell group is "silent" because inhibitory signal inputs "knock out" the influx of excitatory signals. The neuron group is inactive.
But then, from an axon that meanders around among the members of the cell group, a neuromodulator substance is released that produces a reduced sensitivity to the inhibitory signal inflow. Within seconds, the excitatory signals have taken over the neuronal group's behavior and activated it. Suddenly, a feeling of "bad mood" grows up in them.

Both small molecule transmittersand neuropeptides can have neuromodulatory effects (depending on the anatomical-physiological circumstances).