I saw that the same Theorem has been asked here again for explanation but the question I want to make is different.
I see why $\vert \langle Tx_n,x_n\rangle \vert \rightarrow \vert \vert T \vert \vert = \sup_{x \in H, \vert \vert x \vert \vert =1} \vert \langle Tx,x \rangle \vert$ holds. And also by this, it follows $\langle Tx_n,x_n\rangle$ is a real bounded sequence.
I can't understand why $\langle Tx_n,x_n\rangle \rightarrow λ$. All I see is that since $T$ is compact operator, there is a subsequence $(x_{n_k})$ of $(x_n)$ such that $Tx_{n_k}$ is convergent.
EDIT: From the answer below , I realised my question wasn't clear enough. I wanted to ask is how did we use the compactness of $\;T\;$ in the convergence of $\langle Tx_n,x_n\rangle\;$..?
I'm really confused here.. I would appreciate any help!
Thanks in advance

It has nothing to do with compactness. A selfadjoint operator has no residual spectrum: if $\lambda\in\sigma(T),$ then either $\lambda$ is an eigenvalue, or $T-\lambda I$ is injective; in the latter case, $$ \overline{\text{ran}\,(T-\lambda I)}=\ker(T-\lambda I)^\perp=\{0\}^\perp=H.$$ So $T-\lambda I$ cannot be bounded below (if it were, it would be invertible) and thus $\lambda$ is an approximate eigenvalue, which is what the proof uses.