In a galvanic cell, at anode oxidation takes place which releases electrons. These electrons are attracted by cathode and hence the electrons flowing from anode to cathode are gained in reduction reaction. As long as the redox reaction proceeds, there is a flow of electrons and hence electricity.