Huperzine A is a chemical compound known as an alkaloid. It is derived from the club moss Huperzia serrata, which is a member of the Lycopodium genus.  It was first isolated in the 1940s.
It is a compound extracted from the herbs of the Huperziceae family. It is known as an acetylcholinesterase inhibitor, which means that it stops an enzyme from breaking down acetylcholine which results in increases in acetylcholine, known for its role in maintaining and enhancing memory.
Chemically speaking, Huperzine A has been known to inhibit the enzyme acteylcholinesterase. This binding results in the inhibition of the enzyme, thereby increasing the amount of acetylcholine available in a neuronal synapse.
It has been shown that after ingestion, it takes about 1 hour for huperzine A to reach peak levels in the bloodstream. 
Worldwide studies have shown that Huperzine A supports learning and memory by protecting acetylcholine, a neurotransmitter that acts as a messenger molecule in the brain.
In a double-blind, placebo- controlled trial students were given either huperzine A or a placebo for 4 weeks. Students using Huperzine A scored higher on memory tests than those who took the placebo. 
Side effects are rare, but in limited cases, side effects of Huperzine A can include nausea, vomiting and diarrhea. These side-effects are associated with significantly higher doses than are typical in most dietary supplements.
Huperzine A is approved as a dietary supplement component under provisions of the Dietary Supplement Health and Education Act of 1994. Huperzia serrata, its source plant has for centuries been widely consumed as a dietary supplement for its beneficial cognitive effects.