You feel the urge to urinate (as well as evacuate your bowels and vomit) when scared because of the surge of adrenaline (epinephrine for US) that is released as part of the "Fight or Flight" effect.
The adrenaline starts what is known as a cascade. This is like a series of tripped dominoes. The adrenaline causes other endocrine glands to release hormones that in turn causes other hormones to be triggered.
The end result is the "Fight or Flight" effect. Basically the effect is for the body to cut down blood supply to what are unessential organs and shunt the blood to essential organs. This is essential for survival.
Essential organs are the brain, heart, lungs and the sense organs. Non essential organs are the digestive, elimination and reproductive systems. Hence the blood is shut off from these organs, and if full the body triggers emptying. Thus your bladder and bowel loosen and you testicles become smaller.
At the same time blood is pumped faster to the brain, limbs and lungs. The brain gets it supply increased so it is able to process information faster, the lungs so they can increase the flow of oxygenated blood to the vital organs. Blood pressure rises (blood vessel get smaller), heart rate increases, eyes dilate so more light floods in therefore more visual stimuli, face either flushes (fight) or gets pale (flight). The legs get more blood in case you run, the arms in case you fight. the result is heat, flushing of the skin, sweating etc.
This reaction takes place in micro seconds. The most common reaction is the sick feeling you get when you get a fright. This is the "Fight or Flight" effect starting and finishing in a couple of seconds.
Other hormones are released as the cascade proceeds, such as atropine, endorphines etc. Any good physiology book will give your greater detail. You will find them in any good library and most school libraries as well.
Hope this helps.