Every RC car I've cannibalized has had a small ceramic capacitor soldered on to the contacts of the motors. What is the purpose of having this? What happens to the performance of the motor with out this?
The other two people who have answered have the first part right: the small-value ceramic capacitor acts as a high frequency filter. The brushes create insane amounts of broad-spectrum high frequency noise and this can interfere with the electronics (especially the radio receiver). The capacitor acts as a short-circuit at high frequencies (Xc = 1/(2*pi*fC)) and it is soldered as close as possible to the commutator (i.e. right at the motor leads) to minimize the "antenna" these frequencies see. If the capacitor was not there the noise would "see" several inches of motor lead which would act as a great little antenna for broadcasting this noise into anything nearby, especially the sensitive radio receiver.
It has nothing to do with smoothing over anything -- the capacitor is far too small to be effective as a temporary storage device. It's being used as a frequency-selective low-impedance shunt, a low-pass filter, if you will.
Low value capacitors are used to reduce the RF noise caused by brushed motors. RF noise can interfere with your control signal which is obviously a particular problem in RC vehicles because of the proximity to the receiver.
In a brushed motor the brush contacts are constantly making and breaking contact with the power, which produces high frequency electrical noise.
The capacitor acts to reduce this high frequency signal by holding charge and smoothing over any changes so rather than fast spikes and dips in the power supply you just get a gentle wave. [See Andrew's answer for the details on how this works.]
A capacitor across leads is always a filter, filtering out high frequency (noise) signals. It also can be charged up, and discharged, so it acts like a very small and short lived battery, smoothing out the signal that doesn't get filtered out.