If you are just looking for cohomology of the structure sheaf (or of the twists $\mathcal{O}_X(n)$), then it should be pretty easy.
You have the following short exact sequence.
$$0 \to O_{\mathbb P} (-d + n) \to O_{\mathbb P}(n) \to O_Z(n) \to 0 $$
Take cohomology. Because $\mathbb{P}$ is projective space (of whatever dimension) almost all of the cohomology groups $H^i(P, \mathcal{O}_{\mathbb{P}}(k))$ vanish. Whatever doesn't vanish is relevant to computing the cohomology of $\mathcal{O}_Z(n)$.
For example, the only two relevant parts of the sequence are:
$$0 \to H^0(\mathbb{P}, O_{\mathbb P} (-d + n)) \to H^0(\mathbb{P}, O_{\mathbb P}(n)) \to H^0(Z, O_Z(n)) \to 0.$$
and
$$0 \to H^{\dim Z}(Z, O_Z(n)) \to H^{\dim Z + 1}(\mathbb{P}, O_{\mathbb P} (-d + n)) \to H^{\dim Z + 1}(\mathbb{P}, O_{\mathbb P}(n)) \to 0.$$
So for example, the dimension of $H^{\dim Z}(Z, O_Z(n))$ is the same as the dimension of $H^{\dim Z + 1}(\mathbb{P}, O_{\mathbb P} (-d + n))$ minus the dimension of $H^{\dim Z + 1}(\mathbb{P}, O_{\mathbb P} (-n))$.
See Chapter III, Section 5 of Hartshorne for example.
For a generalization to complete intersections, see Exercise 5.5 in that same section of Hartshorne.
Of course, if you trying to compute the cohomology of some other sheaves, then it will be much much harder and it will depend on the sheaves as Emerton above suggests.