It is well-known that $Hilb^n(X)$, the hilbert scheme of $n$ points on a smooth projective surface $X$, is isomorphic to $M_X(1,\mathcal O_X,n)$, the moduli space of rank one semistable sheaves with trivial determinant and second chern class $n$. The canonical morphism in one direction sends a subscheme $Z\subset X$ to it's ideal sheaf $\mathcal I_Z$. I was wondering how to go in the other direction. Namely, given a semistable sheaf of rank 1, trivial determinant, and with second chern number $n$, how do I get an injection into $\mathcal O_X$?
A similar result holds for example for Hilbert schemes of curves on Calabi-Yau 3-folds, so an explanation which takes into account this case as well is preferable.