[guided]The reduction works because complementing a graph reverses adjacency for distinct vertices. Let $G=(V,E)$ be a finite simple undirected graph, and let $\overline{G}=(V,\overline{E})$ be its complement, where
\begin{align*}
\overline{E}=\{\{u,v\}: u,v \in V,\ u \neq v,\ \{u,v\} \notin E\}.
\end{align*}
We need to prove that the reduction preserves yes-instances and no-instances. Equivalently, we prove
\begin{align*}
(G,k) \in \mathrm{CLIQUE} \iff (\overline{G},k) \in \mathrm{INDEPENDENT}\text{-}\mathrm{SET}.
\end{align*}
First assume that $(G,k)$ is a yes-instance of $\mathrm{CLIQUE}$. By definition, there is a subset $S \subseteq V$ with $|S| \geq k$ such that every two distinct vertices $u,v \in S$ satisfy $\{u,v\} \in E$. The complement graph puts an edge between two distinct vertices exactly when that edge was absent from $G$. Therefore, for every distinct $u,v \in S$, the fact that $\{u,v\} \in E$ implies $\{u,v\} \notin \overline{E}$. This is precisely the condition that no two distinct vertices of $S$ are adjacent in $\overline{G}$. Hence $S$ is an independent set of size at least $k$ in $\overline{G}$.
Now assume that $(\overline{G},k)$ is a yes-instance of $\mathrm{INDEPENDENT}\text{-}\mathrm{SET}$. Then there is a subset $S \subseteq V$ with $|S| \geq k$ such that no two distinct vertices of $S$ are adjacent in $\overline{G}$. In symbols, for every distinct $u,v \in S$, one has $\{u,v\} \notin \overline{E}$. Since $\overline{E}$ contains exactly the unordered pairs of distinct vertices that are not edges of $G$, the statement $\{u,v\} \notin \overline{E}$ forces $\{u,v\} \in E$. Thus every pair of distinct vertices in $S$ is adjacent in $G$, so $S$ is a clique of size at least $k$ in $G$.
This proves that a subset witnesses a clique in $G$ exactly when the same subset witnesses an independent set in $\overline{G}$.[/guided]