My textbook, Quantum Field Theory and the Standard Model by Schwartz, says the following:
The easiest way to study a quantum harmonic oscillator is with creation and annihilation operators, $a^\dagger$ and $a$. These satisfy $$[a, a^\dagger] = 1.$$ There is also the number operator $\hat{N} = a^\dagger a$, which counts modes: $$\hat{N} \mid n \rangle = n \mid n \rangle.$$
I’ve only just started learning bra-ket notation, but as I understand it, $\hat{N} \mid n \rangle$ is just applying the operator $\hat{N}$ to $n$? But how does this result in $\hat{N} \mid n \rangle = n \mid n \rangle$?
I would appreciate it if people could please take the time to clarify this.