[guided]The idea is to subtract two equations — one satisfied by the numerical solution (exactly, by definition of the scheme) and one satisfied by the exact solution (approximately, up to truncation error). The difference isolates the error.
The explicit Euler scheme defines the numerical solution:
\begin{align*}
U_m^{n+1} = \mu U_{m-1}^n + (1 - 2\mu) U_m^n + \mu U_{m+1}^n, \qquad \mu = \frac{k}{h^2}.
\end{align*}
For the exact solution $u$, we need to see how well it satisfies the same recurrence. Expanding $u(x_m, t_{n+1})$ in a Taylor series about $t_n$:
\begin{align*}
u(x_m, t_{n+1}) = u(x_m, t_n) + k \, \partial_t u(x_m, t_n) + \frac{k^2}{2} \, \partial_{tt} u(x_m, t_n^*),
\end{align*}
for some $t_n^* \in (t_n, t_{n+1})$. Since $u$ solves the heat equation, $\partial_t u = \partial_{xx} u$, so
\begin{align*}
u(x_m, t_{n+1}) = u(x_m, t_n) + k \, \partial_{xx} u(x_m, t_n) + O(k^2).
\end{align*}
By the [Taylor Expansion of the Second Central Difference](/theorems/1363), the spatial second difference satisfies
\begin{align*}
u(x_{m-1}, t_n) - 2u(x_m, t_n) + u(x_{m+1}, t_n) = h^2 \, \partial_{xx} u(x_m, t_n) + O(h^4).
\end{align*}
Substituting $k \, \partial_{xx} u = \mu \bigl[u(x_{m-1}, t_n) - 2u(x_m, t_n) + u(x_{m+1}, t_n)\bigr] + O(\mu h^4/1)$:
\begin{align*}
u(x_m, t_{n+1}) = \mu \, u(x_{m-1}, t_n) + (1 - 2\mu) \, u(x_m, t_n) + \mu \, u(x_{m+1}, t_n) + \tau_m^n,
\end{align*}
where $\tau_m^n = O(k^2) + O(kh^2)$. Since $k = \mu h^2$, both terms are $O(h^4)$, so there exists a constant $c_1 > 0$ (depending on bounds for $\partial_{tt} u$ and $\partial_{xxxx} u$) such that $|\tau_m^n| \leq c_1 h^4$.
Subtracting the exact-solution relation from the scheme equation, and writing $e_m^n = U_m^n - u(x_m, t_n)$:
\begin{align*}
e_m^{n+1} = \mu \, e_{m-1}^n + (1 - 2\mu) \, e_m^n + \mu \, e_{m+1}^n - \tau_m^n.
\end{align*}
This is the error recurrence: the error at the next time step is a weighted combination of errors at the current time step, plus a local truncation error forcing term.[/guided]