In Jech's Set Theory, Chapter 11, the universal set $U$ is defined as: For each $\alpha \geq 1$, there exists a set $U \subset \mathcal{N}^2$ such that $U$ is $\Sigma_{\alpha}^0$ (in $\mathcal{N}^2$) and that for every $\Sigma_{\alpha}^0$ set $A$ in $\mathcal{N}$, there exists some $a \in \mathcal{N}$ such that $A = \{x:(x,a) \in U\}$. Here, $\mathcal{N}$ refers to the set $\omega^{\omega}$ (i.e. the Baire space), and $\Sigma_{\alpha}^0$, $\Pi_{\alpha}^0$ for some ordinal $\alpha$ are collections of sets that form the Borel heirarchy.
The proof that $U$ exists is done by induction on $\alpha$. Namely, let $U$ be a universal $\Sigma_{\alpha}^0$ set, we can construct a universal set $V$ that is $\Sigma_{\alpha+1}^0$, and the idea is:
$$ (x,y) \in V \text{ if and only if for some $n$}, (x,y_{(n)}) \not \in U $$
Where $y_{(n)}$ is $y_{(n)}(k)=y(\Gamma(n,k))$ and $\Gamma : N \times N \rightarrow N$ is some one-to-one and onto pairing function. It follows that if $(x,y_{(n)}) \not \in U$, then $(x,y_{(n)})$ belongs to a $\Pi_{\alpha}^0$ set.
Now, in the next paragraph of the proof, we have that if $A$ is some $\Sigma_{\alpha+1}^0$ set in $\mathcal{N}$, then $A=\bigcup_{n=0}^{\infty}A_n$, where each $A_n$ is $\Pi_{\alpha}^0$ (i.e. which is the definition of $\Sigma_{\alpha+1}^0$). For each $n$, let $a_n$ be such that $\mathcal{N} - A_n = \{x : (x,a_n) \in U \}$, and let $a$ be such that $a_{(n)} = a_n$ for all $n$. Then $A = \{ x: (x,a) \in V \}$.
I am not sure how $A = \{ x: (x,a) \in V \}$ satisfies the definition of $V$ that $(x,y) \in V \text{ if and only if for some $n$}, (x,y_{(n)}) \not \in U$, because if $a_{(n)} = a_n$ for all $n$ and $a_n$ is such that $(x,a_n) \in U$ (as per previous paragraph), then doesn't that imply that $(x,a_{(n)}) = (x,a_n) \in U$ ?
(edit$^1$: unless of course, I take into account the implicit fact that $\Sigma_{\alpha}^0 \subset \Sigma_{\alpha+1}^0$ and $\Pi_{\alpha}^0 \subset \Sigma_{\alpha+1}^0$ for all ordinals $\alpha$ ... but this fact wasn't mentioned at all in the proof so I may be missing something here...)
(edit$^2$: or is it because each $x \subset \mathcal{N} \times \mathcal{N}$ is both open and closed ?)
Turning some comments into an answer.
Since $U\subseteq\mathcal N^2$ is $\mathbf{\Sigma}^0_\alpha$-universal and $A_n\subseteq\mathcal N$ is $\mathbf{\Pi}^0_\alpha$, so that $\mathcal N-A_n$ is $\mathbf{\Sigma}^0_\alpha$, we must have $$\mathcal N-A_n=\{x\in\mathcal N\mid (x,a_n)\in U\},$$ for some $a_n\in\mathcal N$. But this is equivalent to saying that $$A_n=\{x\in\mathcal N\mid (x,a_n)\not\in U\},$$ for the same $a_n\in\mathcal N$ as above.
That being said let me try to explain the intuition behind this argument. The fact that $U\subseteq\mathcal N^2$ is $\mathbf{\Sigma}^0_\alpha$-universal means that $U$ is coding $\mathbf{\Sigma}^0_\alpha$ subsets of $\mathcal N$ by elements of $\mathcal N$, by thinking about $a\in\mathcal N$ as the code for the set $\{x\in\mathcal N\mid (x,a)\in U\}$. Now note that if we can find a $\mathbf{\Sigma}^0_\alpha$-universal set $U\subseteq\mathcal N^2$, then we can also find a $\mathbf{\Pi}^0_\alpha$-universal set $U'\subseteq\mathcal N^2$, since it is enough to take $U'=\mathcal N^2\setminus U$. The point now is that to find a $\mathbf{\Sigma}^0_{\alpha+1}$-universal set, one should note that every $\mathbf{\Sigma}^0_{\alpha+1}$ set $A$ is determined by a countable sequence of $\mathbf{\Pi}^0_\alpha$ sets $A_n$ with $A=\bigcup_n A_n$, and we already know how to code the sequence $(A_n)$ with an element of $\mathcal N^\omega$, since we know how to code each $A_n$ with an element of $\mathcal N$. But $\mathcal N$ is homeomorphic to $\mathcal N^\omega$ so we are done.