The linked web page concerns finite-difference methods applied to the wave equation $u_{tt}-c^2u_{xx}=0$ for $x\in[0,1]$. Both the time derivative and the space derivative are discretized using second-order centered finite differences. Using the notation $u_i^n \simeq u(i\Delta x,n\Delta t)$, the time-stepping procedure reads $$ u_{i}^{n+1} = -u_{i}^{n-1} + 2u_i^n + \left(\frac{c\Delta t}{\Delta x}\right)^2 (u_{i+1}^n - 2 u_i^n + u_{i-1}^n) \, . $$ Therefore, the stencil requires that one ghost cell is added on each side of the spatial domain. The ghost cell at $x=0$ has index $i=-1$. The homogeneous Neumann boundary condition $u_x|_{x=0} = 0$ is discretized using second-order centered finite differences too: $$ 0 = u_x|_{x=0} \simeq \frac{u_{1}^n-u_{-1}^n}{2\Delta x} \, , $$ i.e. $u_{-1}^n = u_1^n$ at all times. The ghost cell value is equal to the interior cell value.