Most if not all e-drum kits have MIDI in & out which allows you to send MIDI performace to a software program and then use that program to trigger the sounds out of the machine (or to trugger other machines/samplers).
The pads serve as triggers (just like keys on a keyboard) the drum module (brain) acts a both a converter and as a sound module.
As indicated in the previous post, e-cymbals are weak samples at best (cymbals have too many harmonics and too long of a decay to sample well) so accoustic cymbals normally sound better, however mixed low enough in the mix with proper processing, e-cymbals can be functional (if not great).
Candidly, I have heard some awful sounding accoustic cymbals, which in my opinion were far worse than some e-cymbal sounds I've heard.