The answer that is given depends on who is asked.
Different points on the body are used to stimulate nerves and in the processes sends a signal to the brain. The brain then releases different chemicals, such as endorphins and enkephalins. By inserting a needle, the body is increasing blood flow to a specific area and mobilizing the body's natural healing response.
TCM (Traditional Chinese Medicine) acknowledges all of this, and takes it farther. There are many pathways that run through the body, much like roadways. Each of these pathways transports substances the body needs to other portions of the body. Problems arise when the pathways don't have enough substance, have too much substance, or pathways are blocked. Acupuncture works to reestablish the flow of these channels to increase resilience of the body.