The ulnar nerve comes from the medial cord of the brachial plexus, and runs posterior to the humerus down the arm, going behind the medial epicondyle at the elbow. This part of the ulnar nerve is known as the funny bone, because it is easily knocked, and sends a tingling sensation down the arm.
It enters the anterior (front) side of the forearm, and runs alongside the ulna. It supplies one and a half muscles in the forearm: flexor carpi ulnaris (which flexes and adducts the wrist), and the medial two digits of flexor digitorum profundis (a muscle that flexes the fingers).
After its journey down the ulna, the ulnar nerve enters the palm of the hand (passing above the flexor retinaculum), to supply most of the muscles there. (Except for the thenar muscles, and the lateral two lumbrical muscles.)
Sensory information from the lateral one and a half fingers, (the little finger and half of the ring finger,) and the body of the hand below these fingers, on both the palmar and dorsal surfaces of the hand, is sent back to the brain via the ulnar nerve.