Just touching the terminals. And depending on the construction of the capacitor, touching any exposed metal parts while touching something else in the device may be bad as well (this does not apply for most typical modern consumer capacitors).
And even without discharging, the shock is not very pleasant, but not deadly, unless you have some other medical conditions, or fall off the chair from surprise. Just don't touch two terminals with fingers of each hand, which is a good idea when working with any other high-energy circuits.