First, some basics:
In order to urinate, you need three things: kidneys, a bladder, and some tubes.
From Wiki:
The action potentials are carried by sensory neurons to the sacral segments of the spinal cord through the pelvic nerves the parasympathetic fibers carry the action potentials to the urinary bladder in the pelvic nerves. This causes the wall of the bladder to contract. In addition, decreased somatic motor action potentials cause the external urinary sphincter, which consists of skeletal muscle, to relax. When the external urinary sphincter is relaxed urine will flow from the urinary bladder when the pressure there is great enough to force urine to flow through the urethra. The micturition reflex normally produces a series of contractions of the urinary bladder.
Action potentials carried by sensory neurons from stretch receptors in the urinary bladder wall also ascend the spinal cord to a micturition center in the pons and to the cerebrum. Descending potentials are sent from these areas of the brain to the sacral region of the spinal cord, where they modify the activity of the micturition reflex in the spinal cord. The micturition reflex, integrated in the spinal cord, predominates in infants. The ability to voluntarily inhibit micturition develops at the age of 2-3 years, and subsequently, the influence of the pons and cerebrum on the spinal micturition reflex predominates. The micturition reflex integrated in the spinal cord is automatic, but it is either stimulated or inhibited by descending action potentials. Higher brain centers prevent micturition by sending action potentials from the cerebrum and pons through spinal pathways to inhibit the spinal micturition reflex. Consequently, parasympathetic stimulation of the urinary bladder is inhibited and somatic motor neurons that keep the external urinary sphincter contracted are stimulated.
The pressure in the urinary bladder increases rapidly once its volume exceeds approximately 400-500 ml, and there is an increase in the frequency of action potentials carried by sensory neurons. The increased frequency of action potentials conducted by the ascending spinal pathways to the pons and cerebrum results in an increased desire to urinate.
Voluntary initiation of micturition involves an increase in action potentials sent from the cerebrum to facilitate the micturition reflex and to voluntarily relax the external urinary sphincter. In addition to facilitating the micturition reflex, there is an increased voluntary contraction of abdominal muscles, which causes an increase in abdominal pressure. This enhances the micturition reflex by increasing the pressure applied to the urinary bladder wall.
And the general length of time:
The time it takes to urinate differs from person to person and from urination session to urination session. For example, it may take some people up to several minutes to fully void, while it may take others 5-10 seconds. The average time is much closer to the lower end of the scale. Normally, this depends on how long it has been and how much and what type of liquid the person has consumed since the last urination. Other factors include a size of the Prostate in men and the strength of the Urethral sphincter
