Let $A$ be a self-adjoint operator (specifically it is allowed to be unbounded) and let $f$ be a bounded Borel-measurable function. Through the functional calculus we may make sense of $f(A)$.
Let $P$ be an orthogonal projection, which does not commute with $A$. But $PAP$ is of course also self-adjoint.
Is there any relationship between $\sigma(P f(A)P)$ and $\sigma(P A P)$? In particular any relation of inclusion? We may also consider the problem as the relation between $\sigma(\left.A \right|_{W})$ and $\sigma(\left.f(A) \right|_{W})$ where $W$ is the closed subspace which is the range of $P$.
Do you mean to ask about a relationship between $\sigma\big (Pf(A)P\big )$ and $f\big (\sigma(PAP)\big )$?
In any case, there is very little one can say regarding the relationship between these sets. Consider, for instance, the following two examples:
Let $ f(x)=x^2$, and $$ P=\pmatrix{1 & 0 \cr 0 & 0},\quad\text{and} \quad A=\pmatrix{0 & 1 \cr 1 & 0}. $$ Then $\sigma\big (Pf(A)P\big )=\{0, 1\}$ and $\sigma(PAP)=\{0\}$, whence $f\big (\sigma(PAP)\big ) = \{0\}$.
Let $ f(x)=x^2$, and $$ P=\pmatrix{1 & 0 \cr 0 & 0},\quad\text{and} \quad A=\pmatrix{1 & 2 \cr 2 & 1}. $$ Then $\sigma\big (Pf(A)P\big )=\{0, 5\}$ and $\sigma(PAP)=\{0, 1\}$, whence $f\big (\sigma(PAP)\big ) = \{0, 1\}$.
I suspect the only thing one can say for sure is that both $\sigma\big (Pf(A)P\big )$ and $\sigma(PAP)$ contain zero!
EDIT. Here is a more radical example showing that, for any two compact subsets $E$ and $F$ of $\mathbb R$, both containing zero, one can find a bounded operator $A$, and a function $f$, such that $$ f\big (\sigma(PAP)\big )=E, \quad \text{and}\quad \sigma\big (Pf(A)P\big )=F. $$
Let $x$ and $y$ be any two bounded, self-adjoint operators on $H$, and put $$ z=y-x^3-2x. $$ Consider the operator $A$ on $H\oplus H$ given by $$ A=\pmatrix {x & 1\cr 1 & z}. $$ With $f(t)=t^3$, one then has that $$ f(A)= A^3=\pmatrix {x^3+2x+z & x^2+z^2+xz+1 \cr x^2+z^2+zx+1 & z^3+2z+x}. $$ Letting $P=\pmatrix{1 & 0 \cr 0 & 0}$, it follows that $$ Pf(A)P=\pmatrix {x^3+2x+z & 0 \cr 0 & 0} = \pmatrix {y& 0 \cr 0 & 0}. $$ Recalling that we were given closed sets $E$ and $F$ above, choose $x$ and $y$ such that $\sigma (x) = \root 3 \of E$, and $\sigma (y)=F$. So, $$ \sigma (PAP)= \sigma \pmatrix {x & 0 \cr 0 & 0} = \sigma (x)\cup \{0\} = \root 3 \of E \cup \{0\} = \root 3 \of E, $$ whence $$ f\big (\sigma (PAP)\big ) = f\big (\root 3 \of E \big ) = E, $$ while $$ \sigma \big (Pf(A)P\big )= \sigma (y)\cup \{0\} = F, $$