(N/A) cell consists of two electrodes,positive $(P)$ and negative $(N)$,partially dipped in an electrolyte. Chemical reactions produce positive and negative ions,creating a potential difference between the electrodes and the electrolyte.
The potential difference between the positive electrode and the electrolyte is $V_{+} (V_{+} > 0)$,and between the electrolyte and the negative electrode is $V_{-} (V_{-} < 0)$.
When no current flows in the circuit,the potential difference between the two terminals $P$ and $N$ is $\varepsilon = V_{+} - (-V_{-}) = V_{+} + V_{-}$. This is defined as the electromotive force (emf) of the cell.
Definition of emf: The energy gained by a unit positive charge when it moves from the negative to the positive terminal of the cell due to non-electric forces is called the emf of the cell.
When a resistor $R$ is connected to the cell,a current $I$ flows through the circuit. The potential difference $V$ across the resistor $R$ is $V = IR$.
Due to the internal resistance $r$ of the cell,there is a potential drop across it equal to $Ir$. Thus,the total emf $\varepsilon$ is the sum of the potential difference across the external resistor and the potential drop across the internal resistance:
$\varepsilon = V + Ir$
Substituting $V = IR$,we get $\varepsilon = IR + Ir = I(R + r)$.
Therefore,the relation is $V = \varepsilon - Ir$.