As already noted, we can imagine any redox reaction as taking place in two parts -- an oxidation half-reaction, and a reduction half-reaction.
When we think of a usual redox reaction, say the burning of H2 in O2, any energy released is released as heat.
Almost always, clever engineering makes it possible to separate half-reactions physically, and to make the electrons released by the oxidation half-reaction go through a wire to reach the reduction half-reaction. (This always requires a second physical pathway between the reactions that permits ions to migrate.)
When a reaction is conducted this way, and done so that the current is kept very low, most of the chemical free energy available from the reaction can be extracted was useful energy -- work.
This is an extremely important notion, one discussed at length in the chemical thermodynamics course. A modern chemistry teacher needs to be well-versed on these issues.