How is potential difference greatest when battery is not in a circuit? I was just studying physics and came across this in the textbook that “A cell produces its highest p.d. when not in a circuit and not supplying current.” Could you please explain this? If the cell is not in a circuit, it is not supplying energy to the charges to flow through anything as there is no circuit/conductor and since p.d. is defined as amount of potential energy (in joules)  given to each coulomb of charge, potential energy should be 0. Right? 

 A: 
I was just studying physics and came across this in the textbook that
  “A cell produces its highest p.d. when not in a circuit and not
  supplying current.” Could you please explain this?

The voltage that is developed within the battery is called its emf. It is the voltage the battery produces with nothing connected to its terminals that draws current. All real batteries have internal electrical resistance, $R_b$, as shown in the circuit below. That resistance is in series with the internally generated emf and the battery's terminals. 
Without the load $R_L$ connected to the battery terminals there is no current, and the terminal voltage is the open circuit battery voltage. It equals the battery's internal emf (internal voltage). 
But when the load $R_L$ is connected across the terminals, current flows equal to
$$I=\frac{emf}{R_{b}+R_L}$$
The voltage drop across the internal battery resistance is then
$$IR_b$$
That makes the battery terminal voltage
$$V_{terminals}=emf-IR_{b}$$ 
Which is less than the battery's emf.
Note that the greater $R_{L}$ is compared to $R_b$, the less the current drawn and the closer the terminal voltage will be to the battery emf.

Thanks. What exactly is potential difference then?? Definition??

In answer to your follow up question, 
The potential difference $V$ between two points is defined as the work required per unit charge to move the charge between the two points. Units are Joules per coulomb.
Let me give you a mechanical analogy that might be helpful. 
Say you have a water pump connected to a water line with a valve that is shut off. A pressure gauge in the line next to the valve gives you a pressure reading indicative of the mechanical potential energy available at the valve to push water in the line. That reading is analogous to the battery emf. Now you open the valve and let the pump push water in the  line. The water is analogous to the current. The reading of the pressure gauge drops because of the resistance of the pipe between the pump an valve to water flow. The drop in water pressure is analogous to the drop in voltage across the battery terminals when current is drawn.
Hope this helps.

A: The potential difference across a cell in a battery is driven by an electrochemical reaction. In general, chemical reactions occur at a specific rate and to a specific degree of completion which depends on things like the concentration of the products and the reactants and the temperature. 
In an electrochemical cell, as the reaction rate increases there is a higher concentration of products and a lower concentration of reactants in the region immediately outside of the electrode. This shifts the reaction equilibrium away from completion, and therefore results in a lower potential difference. The speed of the reaction is governed by the current. So as the current increases the reaction equilibrium shifts to a lower potential difference. This is one chemical source of what is known as the internal resistance of a cell. 
As the current goes to zero the reactant concentration is maximized, the reaction goes to the furthest completion, and the electrochemical potential is maximum. 
