Understanding Riesz–Markov–Kakutani representation theorem The Riesz representation theorem is very easy to understand. Further, every continuous linear functional $A[f]$ over the space $C([0, 1])$ of continuous functions in the interval $[0,1]$ can be represented in the form
$$A[f]=\int_0^1 fdg$$ (1)
where $g:[0,1]\to\mathbb R$ is a BV function on [0,1].
$g:[0,1]\to\mathbb R$ is certainly not a Borel measure $\mu:\mathcal B(\mathbb R) \to\mathbb R$. But by the generalized form of representation theorem should the $g$ be a Borel measure?
Also when $f\in \mathcal H$ Hilbert space (L2), $\exists h(A[f]=f\cdot h)$ This is closely related to the previous equation (1). Borel measure seems not involved again. 
But for a $L_1(\mathbb R)$ linear functional $T$ 
$$T(f)=\int_\mathbb R fd\mu$$
Where $\mu$ is Complex Borel measure. I think the only major difference between this and the equation (1) is the difference between [0,1] and $\mathbb R$, which should not be the source of "complex"? 
Here what is difference between complex Borel measure and Borel measure? Why we need to use complex Borel measure for the $L_1(\mathbb R)$ case?
I totally get lost.
 A: The main difference is that in the first case, the functional is defined on the space of continuous functions (on a compact set) whereas in the second case the functional operates on the integrable functions. 
For completeness' sake, I add that there also exists a version for continuous functions for which the integration is performed with respect to a measure. This result is much more general than the ones you mentioned, but in your case, the measure theoretic version and the one with a BV-function are essentially the same. The reason for this is that to each signed measure $\mu$ on an interval corresponds a function with bounded variation $g$ (and vice versa) such that the Riemann-Stieltjes-integral of a continuous function $f$ with respect to $g$ coincides with the Lebesgue-integral of $f$ with respect to $\mu$. See this post for some details.
As for the measure-theoretic versions, whether you have to use a real (i.e. signed) measure or a complex measure just depends on whether your functional is real- or complex-valued. This will most often coincide with whether your continuous/integrable functions are real- or complex-valued, since a linear functional is typically defined to be a linear mapping from a vector space into the underlying scalar field, which can only be $\mathbb{R}$ in the case of real-valued functions. 
The Riesz theorem for Hilbert spaces is, although named the same, a completely different story. This theorem is about the interplay of continuous functionals and the inner product whereas the other theorems are concerned with the representation of functionals by means of an integral. The deeper similarity of all of them is that they offer characterisations of a dual space.
EDIT: As pointed out by Martin Argerami, the last paragraph is incorrect, I quote: 

Any Hilbert space can be represented as $H=L^2(X, \mu)$ for an appropriate measure space $X$, and so the Riesz Representation Theorem says that you can write a bounded functional $\phi$ by$$\phi(f)=\langle f,g\rangle = \int_X f\,\bar g\,d\mu.$$

Therefore, there is a much more immediate similarity between the Riesz theorems. 
