Using the notation in your Wikipedia link for consistency, given any, possibly cheating, verifier $V^*$, you want to construct a simulator $S$ which, given only access to the quadratic residue $v$ (but not the square root $s$), produces an output indistinguishable from the view of the verifier in its interaction with an honest prover.
The way you do this in this case is by basically guessing the bit $e$ the verifier will send. You uniformly sample some random $y\in(\mathbb{Z}/N\mathbb{Z})^*$, as well as $e'\in\{0,1\}$, and set $r=y^2\cdot v^{-e'}$. In both cases, $r$ is a uniformly random invertible quadratic residue, so the distribution of $V^*(r)$ cannot depend on the bit $e'$, and therefore, $e=e'$ happens with probability exactly $1/2$ regardless of the strategy of $V^*$. If they happen to be equal, the simulator outputs $(r,y)$ and otherwise restarts (or aborts, depending on your precise definition of zero-knowledge; it doesn't matter).
In case of success, $(r,y)$ is distributed exactly as in the interaction with an honest prover: $r$ is uniform in $QR_N$, $y$ is uniform in $(\mathbb{Z}/N\mathbb{Z})^*$, and they satisfy $y^2 = r\cdot v^e$. Moreover, success is achieved with overwhelming probability after at most polynomially many repetitions (in the size of $N$). This ensures that the protocol is perfect zero-knowledge.