Edited: Let $X$ be an integral scheme and $R$ a Weil divisor of $X$. How can we view $R$ as a closed subscheme of $X$? What is the corresponding sheaf? My question is motivated by Hartshorne p. 301, where in the proof of proposition 2.3 he mentions that we can view the ramification divisor as a closed subscheme of the curve $X$.
I guess this depends on what you mean by "divisor". Let me assume you mean Weil divisor. A Weil divisor is a finite sum $\sum_i n_i D_i$, where $D_i$ is an integral subscheme and $n_i$ is an integer. The support of this divisor is thus a closed subscheme. Now, there is just one important thing: multiplicities.
If you'd like, you can just ignore the multiplicities $n_i$. This way you obtain a reduced closed subscheme. If you don't do this, your subscheme is non-reduced once $n_i >1 $ or $n_i <-1$ for some $i$.
If you mean Cartier divisor, then for "nice" schemes these correspond to Weil divisors. And thus, the support of the corresponding Weil divisor gives a closed subscheme.
Also, the ramification divisor of a curve is a subtle notion. If you have $f:X\to Y$ a finite flat surjective morphism of regular integral schemes, then the ramification divisor is the Weil divisor supported on the ramification locus of $f$. It has multiplicities though (if $f$ is not etale) whereas the ramification locus is usually considered with its reduced closed subscheme structure.