How can the expectation of a martingale be a random variable The definition of a martingale is 
$\mathbb{E}[X_{n+1} | X_n,...,X_1] = X_n$
Why does it work that the RHS is a random variable. How can we expect to have a variable which random and not a point like $0.25$.?
 A: The left hand side is the conditional expectation of $X_{n+1}$ on the $\sigma$-algebra generated by the random variables $X_1, \dots, X_n$; it's not just the expectation of $X_{n+1}$. 
The definition of $Y = \mathbb{E}[X_{n+1} | X_1, \dots, X_n]$ is that it's unique (up to a.e.) $\sigma(X_1, \dots, X_n)$- measurable random variable such that if $A \in \sigma(X_1, \dots, X_n)$ then $\mathbb{E}[Y 1_A] = \mathbb{E}[X_{n+1} 1_A]$. This means that you don't have that $\mathbb{E}[X_{n+1}|X_1, \dots, X_n]$ is a constant in general by the definition. 
A: For example, let $\{X_n\}$ be unbiased random walk on $\mathbb Z$. Then defining $S_n=\sum_{k=1}^n $ we have 
\begin{align}
\mathbb E[S_{n+1}\mid X_n] &= \mathbb E(S_n+X_{n+1}\mid X_n\}\\ &=  \mathbb E[S_n\mid X_n] + \mathbb E[X_{n+1}\mid X_n]\\ &= S_n + \mathbb E[X_{n+1}]\\&=S_n.\end{align} It is clear that $\mathbb E[S_{n+1}\mid S_n]$ is a random variable taking different values for different values of $\{S_n=k\}$.
A: Here is the context. Consider a p-space $(\Omega, \mathcal{F}, \mathbb{P})$ and a $\sigma$-sub algebra $\mathcal{G} \subseteq \mathcal{F}$. Let $X: \Omega \to \mathbb{R}$ be an integrable random variable on this p-space.
Then we call a random variable $Z: \Omega \to \mathbb{R}$ a version of the conditional expectation of $X$, given the sigma-algebra $\mathcal{G}$, if 
(1) $Z$ is $\mathcal{G}$-measurable
(2) $\forall G \in \mathcal{G}: \mathbb{E}[XI_G]= \mathbb{E}[ZI_G]$
Showing that this exists might take some work (can be proven using Hilbert space techniques or Radon-Nikodym's theorem). Such a variable is also unique a.e.
We denote such a variable with $Z:=\mathbb{E}[X|\mathcal{G}]$
In your situation, $\mathcal{G}= \sigma(X_1, \dots, X_n)$, the smallest $\sigma$-algebra that makes the maps $X_1, \dots, X_n$ measurable.
One simplifies notation and defines
$$\mathbb{E}[X_{n+1}|X_1, \dots, X_n]:= \mathbb{E}[X_{n+1}|\sigma(X_1, \dots, X_n)]$$
