The basic PTT (push to talk) button on the HT is a simple switch that is normally open and when it is pressed, the switch is closed (conducting). Internally to the radio, this applies power to the PA (power amplifier) stage of the transmitter, it idles the receiver, it switches the frequency synthesizer to generate the correct transmit frequency and a number of other "housekeeping" actions.
An external PTT switch is easily added. Here is a nice diagram from the miklor.com site.
You can see the switch to the far left of the circuit. It is wired to the outer most "ring" of each plug. Closing (pressing or toggling) that switch will cause the radio to transmit.
Here is the schematic from the same site showing the dual PTT and the optional data connection: