I am trying to understand the basics of sheaf cohomology, so I tried on a concrete example, but things are still very unclear to me...
Let $\mathscr F$ be the coherent subsheaf of $\mathscr O_{\mathbb P^2}$ whose global sections are homogeneous polynomials of $\mathbb C[x,y,z]$ vanishing at $2$ given points $\mathbf a,\mathbf b\in\mathbb P^2$. Is there a way to describe explicitely the cohomology modules $H^1(\mathbb P^2,\mathscr F)$ and $H^2(\mathbb P^2,\mathscr F)$?
Let $X=\{a,b\}\subset \mathbb P^n\; (n\geq 1)$ be a two-point subset of $n$-dimensional projective space and $\mathcal F=\mathcal I_X$ the ideal sheaf of functions vanishing at $a$ and $b$.
This means that for an open subset $U\subset \mathbb P^n$ a section $s\in F(U)=\mathcal I_X(U)\subset \mathcal O(U)$ is a section in $\mathcal O(U)$ vanishing on $U\cap X$ (= a set with $0,1$ or $2$ elements).
We then have an exact sequence of coherent sheaves on $\mathbb P^n$: $$ 0\to \mathcal I_X\to \mathcal O_X \to Sky_X\to 0 $$ where $Sky_X$ is the sky scraper sheaf with stalk $k$ on $X$ and $0$ elsewhere.
Taking the associated cohomology long exact sequence we get $$0\to H^0(\mathbb P^n,\mathcal I_X)=0\to H^0(\mathbb P^n,\mathcal O_X)=k \to H^0(\mathcal P^n,Sky_X)=k^2\to H^1(\mathbb P^n,\mathcal I_X)\to H^1(\mathbb P^n,\mathcal O_X)=0 $$ from which we immediately deduce the required dimension $\operatorname {dim} _k H^1(\mathbb P^n,\mathcal I_X)=1$
As a check, notice that for $n=1$ we have $\mathcal I_X\cong\mathcal O(-2)$ and the equality $\operatorname {dim} _k H^1(\mathbb P^1,\mathcal O(-2))=1$ is easy to see, say by Serre duality.
Notice also that $n=1$ is the only value of $n$ for which $\mathcal I_X$ is an invertible sheaf (= line bundle)
Edit
A trivial modification of the above calculation shows that for a finite subset $X_r \subset \mathbb P^n$ with $r$ elements we have $$\operatorname {dim} _k H^1(\mathbb P^n,\mathcal I_{X_r})=r-1$$