The quick and dirty lesson on capacitors.
They are used for two things, energy storage or filtering.
Energy storage is simple. They are charged and discharged similar to a battery. Hook a charged cap to a resistor and it will discharge a current through the resistor.
Filtering is a little different. look at your circuit and imagine the cap is a 'short' for high frequency noise. so if you wanted to get rid of noise, you would 'short' ground to the positive terminals. Or for motors, 'short' across the two motor terminals. (put the cap across the motor terminals).