Formally, let \(X_1, X_2, X_3,...\) be a sequence of iid random variables with mean 0 and variance 1, and \(S_1, S_2, S_2,...\) their partial sums, i.e., \(S_k = \sum_{i=1}^{k} X_i\). The latter is known as a random walk (for a simple random walk on \(\mathbb{Z}\) the R.V. \(X_i\) are iid coin flips which take the values of -1 and +1 w.p. 0.5).
The process \(W^{(n)} := (W^{(n)}(t), t \in [0, 1])\) defined by \[W^{(n)}(t) := \frac{S \lfloor nt \rfloor}{\sqrt{n}}, \quad t \in [0,1]\] is the rescaled random walk (partial-sum process).
The CLT [1] claim that \(W^{(n)} (1)\) converges to the normal distribution. The Donker's invariance principle extend the CLT to the whole function and states the following: \[(W^{(n)}(t), \, t \geq 0)\ \implies (B(t), \, t \geq 0)\] that is, the random function \(W^{(n)}\) converges in distribution to a standard Brownian motion \(B := (B(t))_{t \in [0,1]}\) as \(n \rightarrow \infty\).
In the following chart there is a simplified simulation of the Donsker's invariance principle. It shows that the partial sum of random variables, known as the random walk, when normalized tends to converge to a standard Brownian motion or Wiener process [2].
In the following chart you can change the number of R.V (steps) \(n\).