I know that correspondence every pure state on a C*-algebra $A$, there is an irreducible representation of $A$. Also we have the following theorem:
Let $A$ be a C*-algebras and $(\pi,H)$ be an irreducible representation of $A$. then either $K(H) \subset \pi(A)$ or $\pi(A) \cap K(H) = \{0\}$.
Now I suppose $P$ is a rank one projection in B(H) and put $A=C^*(P)$ (C*- algebra generated by rank one projection P). Clearly $A\subset K(H)$, so I think $id: A\to B(H)$ such that $id(a)= a$ is not an irreducible representation. How can I show that there is a irreducible representation of $A$?
There is no reason for you to expect a representation into the same $H$ to be irreducible. The only way that could happen is when your operator has trivial commutant.
You need to decide whether you consider the generated subalgebra to contain the ambient unit or not.
If you don't require the unit, $C^*(P)=\{\lambda P:\ \lambda\in\mathbb C\}$, and $\pi(\lambda P)=\lambda$ is an irreducible representation onto $B(\mathbb C)=\mathbb C$.
If you require the unit, $C^*(P)=\{\lambda 1+\mu P:\ \lambda,\mu\in\mathbb C\}$. In this case, $\lambda 1+\mu P\longmapsto \lambda$ and $\lambda1+\mu P\longmapsto \mu$ are irreducible representations onto $\mathbb C$.