There are several theories about how acupuncture works, according to both traditional theory and modern science.
Traditionally, acupuncture is said to stimulate Qi (pronounced "chee") which is a kind of life-energy that flows everywhere in the body, through channels or meridians. When Qi becomes blocked or diminished, illness and pain follow. By inserting needles at specific acupoints, a traditional acupuncturist affects the flow of Qi in your channels, restoring it to a normal, balanced condition and therefore a state of health.
Modern science theories range from explaining the effects of acupuncture through several various mechanisms:
affecting the nervous system and releasing endorphins and enkephalins that modulate pain
encouraging the body to enter a parasympathetic state, or "rest-and-digest" state conducive to healing (as opposed to a sympathetic "fight-or-flight" state)
releasing muscle fibers that are in a state of spasm, often referred to as "trigger points"
changing the behaviour of cells that generate fascia and connective tissue
hypothesizing that acupuncture needles can communicate with stem cell function to regenerate needed tissues.