What is the science behind fruit batteries?

The acid in an acidic fruit such as a lemon provides the acid much like the acid in a battery, and the copper wire and the galvanized nail works as the negative and positive poles. I hope this answers your question!!!