How does a Potato Produce Electricity?

The potato produces electricity due to what it is made up of mainly starches, salts, and water. When the salt and the water are mixed, they produce ions which cause the electrical charge.