a sum of mean-zero independent variables as a martingale
Here is the most basic and most important example of a martingale, the one to keep in your head. Take any sequence of independent random variables X_1, X_2, ... each with mean zero (each a 'fair shock', as likely to push up as down on average). Add them up step by step: S_n = X_1 + X_2 + ... + X_n. The running total S_n is a martingale. This is exactly the model of a gambler making a sequence of independent fair bets, where S_n is the cumulative winnings, and it is the engine behind the simple random walk.
The check is a one-liner and worth doing once so the idea sticks. Condition on the past F_n (the first n variables). Then S_(n+1) = S_n + X_(n+1), where S_n is already known given the past and X_(n+1) is independent of the past with mean zero. So E[S_(n+1) given F_n] = S_n + E[X_(n+1)] = S_n + 0 = S_n, the martingale equation. Notice exactly what was used: independence lets the conditional expectation of the new term reduce to its plain expectation, and the mean-zero assumption makes that zero. If instead each X_i had mean mu, the same computation gives E[S_(n+1) given F_n] = S_n + mu, so S_n would be a submartingale when mu > 0 and a supermartingale when mu < 0 — and S_n - n*mu (the sum re-centred) is once again a martingale.
This example is the seed from which the whole theory grows. Centred partial sums let you turn limit theorems about sums into martingale statements: martingale versions of the law of large numbers and central limit theorem generalize the independent-sum case to dependent settings. A small but important caveat: independence is far more than the martingale property requires. The martingale property only needs each new increment to have conditional mean zero given the past — the increments may be dependent in every other way. That extra slack is precisely why martingales reach so much further than sums of independent variables.
Let X_i be +1 or -1 each with probability 1/2 (mean zero). Then S_n = X_1 + ... + X_n is the simple symmetric random walk and a martingale: given the walk so far, the next step adds +1 or -1 with equal chance, so its conditional expectation is S_n. With a biased step of mean mu, you re-centre as S_n - n*mu to recover a martingale.
Centred partial sums are the prototype martingale; subtract n times the mean to centre a biased walk.
Independence is stronger than needed: the martingale property only requires each increment to have conditional mean zero given the past, which is why martingales generalize sums of independent variables.