Its components allow greater activation of information processing in the brain, which causes it to see things a little clearer and situations from other perspectives. This stimulation makes ideas "better connected" and so when people feel "locked", the excuse of the cup of coffee is always good to turn that trigger.
As a stimulant, some research has shown that coffee may block those signals externar to concentrate on a single idea altogether, but considering different situations that perhaps had not thought of before.