Capacitor location

The decoupling cap should be close to the supply pins if there is a ground-plane or not.
Imagine you have a 555 timer flashing an LED, and it is connected to the supply via one meter long thin wires. ( which will have some resistance and inductance )

Every time the LED switches on, there is a pulse of current drawn from the supply, and there will be a momentary voltage drop on the vcc and ground wires ( but not on say a third wire going to the trigger or reset pins )

If the +ve pulse on the ground pin was higher than 1/3 vcc ( OK this is an exageration ) then the chip would retrigger.

By having a cap on the supply pins, the surge is supplied by the cap, which is recharged slowly between pulses .