The only thing that your body does without direction of some sort from the brain is called a reflex. Reflexes occur in a variety of areas, and they do involved the nervous system, but they bypass the brain itself. In fact, creatures without a brain, for example clams and oysters, still possess reflexes.
In your example, a person who hurts their hand will stimulate a withdrawal reflex. The pain of the injury stimulates sensors which pass the message to sensory nerves. These nerves go up the arm and into the spinal cord, where the message is passed to an outgoing nerve fiber which causes the arm muscles to contract, pulling the hand in toward the body to remove it from the source of injury. Watery eyes, crying, or calling out come from the response of the sympathetic nervous system, which provides the fight-or-flight response when we are hurt or frightened.