It's an acquittal... but there are some important differences between not guilty by reason of insanity (NGI) and a straight "not guilty" verdict.
There are two phases to a trial where the an insanity defense is raised: the guilt phase, where the jury determines whether the defendant did it, and the sanity phase, where they decide whether he was sane. This is called a bifurcated trial; it's similar to a death penalty case, where there is a guilty phase and a penalty phase.
The big difference is that the defendant is free to go after a not guilty verdict, while an NGI verdict can result in commitment to a state mental hospital if the judge finds the defendant has not been restored to sanity. For some violent crimes, there is a minimum commitment period before the defendant can be released.
An NGI verdict in a felony case can also result in extension of the commitment beyond the maximum sentence for the offense if the court finds the defendant has not been restored to sanity, and that he presents a substantial danger of physical harm to others.