A cell that produces electricity is known as an electrochemical cell or voltaic cell or more commonly as a "battery". The electricity production takes place because of chemical reactions that take place within the cell.
In simplest terms, a voltaic cell consists of two metallic electrodes (known as cathode and anode), in an electrolyte solution and are connected to each other. The basis of electricity production is the oxidation-reduction reactions that take place at electrodes. For a simple cell consisting of copper and zinc electrodes, zinc will lose electrons more readily than copper and hence is the anode. Copper will receive the electrons lost by zinc and becomes the cathode (and gets reduced). This flow of electrons cause the current flow.
There are also cells in which electricity has to be supplied to force a chemical reaction. Such cells are known as electrolytic cells.
Hope this helps.