Quantum Field Theory: Number Operator $\hat{N} = a^\dagger a$ and bra-ket notation 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.
 A: $|n\rangle$ is an eigenstate of the number operator $\hat{N}$ with the eigenvalue $n$. Being an eigenstate, applying the operator to the state does not change the state, so the result will be proportional to $|n\rangle$. The proportionality constant is exactly the eigenvalue $n$, hence $\hat{N}|n\rangle = n|n\rangle$.
A: Using the terminology of Weyl's (1930, "The Theory of Groups and Quantum Mechanics"), the interpretation of an equation of form $\hat{L} \, |A\rangle = |B\rangle$ is that the "linear operator" $\hat{L}$ is a "linear correspondence" mapping the vector $|A\rangle$ to another vector $|B\rangle$ in the same vector space.
In Quantum Theory the state of a system is represented by a ray in a vector space (Hilbert space), and two parallel rays of different length represent the same state (only for the probability interpretation to work out do we need to normalize the state vectors). Turning now to your eigenvalue equation $\hat{N} \, |n\rangle = n \, |n\rangle$, here $|n\rangle$ is such a state vector, i.e. a normalized "ray" in Hilbert space, and the operator $\hat{N}$ maps this to a parallel ray whose length is altered by the (real) factor $n$. This does not mean $\hat{N}$ has changed the state. 
A: The creation and annihilation operator work as following when applied to state $| n \rangle$:
$$\hat{a}^\dagger | n \rangle=\sqrt{n+1} | n +1\rangle$$
$$\hat{a}| n \rangle=\sqrt{n} | n -1\rangle$$
So when you apply $\hat{N}= \hat{a}^\dagger \hat{a}$ you get: 
$$ \hat{a}^\dagger \hat{a}| n \rangle=\hat{a}^\dagger\sqrt{n} | n -1\rangle = \sqrt{n}\hat{a}^\dagger  | n -1\rangle=\sqrt{n} \sqrt{n} | n \rangle = n| n \rangle$$
