What's an $\mathcal O_X$-algebra when $X= \operatorname{Spec} R$? Take $X= \operatorname{Spec}R$, $R$ a commutative ring with unit. What is an $\mathcal O_X$-algebra in that case? Is there more than just ordinary $R$-algebras?
Thank you in advance.
 A: In general, $\mathcal{O}_X$-algebras are quite complicated objects and I don't know of any really simpler description.  For instance, suppose $R$ is a discrete valuation ring with maximal ideal $m$.  Then $X$ has two points, $m$ and $0$.  A sheaf $A$ on $X$ just consists of two sets $A(X)$ and $A(\{0\})$ together with a map $A(X)\to A(\{0\})$.  An $\mathcal{O}_X$-algebra structure on such a sheaf consists of an $R$-algebra structure on $A(X)$ and an $R_m$-algebra structure on $A(\{0\})$ such that the map $A(X)\to A(\{0\})$ is a map of $R$-algebras.  If $A(\{0\})$ were required to be the localization of $A(X)$ at $m$, then this would be equivalent to just considering $A(X)$ as an $R$-algebra.  But $A(\{0\})$ does not have to be the localization $A(X)_m$ (it is just some $R_m$-algebra with a map from $A(X)_m$), so an $\mathcal{O}_X$-algebra is considerably more general than an $R$-algebra.
This was of course just the simplest nontrivial case, where $X$ has two points.  You can imagine how much more complicated things might get in general.
On the other hand, if you restrict to quasicoherent $\mathcal{O}_X$-algebras, then all is well.  A quasicoherent $\mathcal{O}_X$-module $A$ must always come from an $R$-module $M=A(X)$, and then a compatible ring structure on $A$ is the same as turning $M$ into an $R$-algebra.  (The ring structures on sections $A(U)$ for arbitrary are uniquely determined by the ring structure on $A(X)$ since when $U$ is a distinguished open set, $A(U)$ is just the localization of $A(X)$ with respect to some element of $R$ and the ring structure must be compatible with the $R$-module structure.)
A: In the following thread
Noetherian $R$-algebra corresponds to a coherent sheaf of rings on $\operatorname{Spec}(R)$
you find the following: Let $X:=Spec(A)$ with $A$ a commutative unital ring. I believe the following "Theorem" holds:
"Theorem". There is an equivalence of categories between the category of sheaves of quasi coherent commutative $\mathcal{O}_X$-algebras and maps of $\mathcal{O}_X$-algebras and the category of commutative $A$-algebras and maps of $A$-algebras.
Proof. Given a commutative $A$-algebra $R$ and an open set $U \subseteq X$. Define
C1. $\mathcal{R}(U):=\mathcal{O}_X(U)\otimes_A R.$
It follows C1 defines $\mathcal{R}$ as a quasi coherent sheaf of commutative $\mathcal{O}_X$-algebras on $X$. Conversely given a quasi coherent sheaf of commutative $\mathcal{O}_X$-algebras $\mathcal{R}$, it follows $R:=\Gamma(X, \mathcal{R})$ is a commutative $A$-algebra. You may check that this defines an equivalence of categories.
In the non-commutative setting the situation becomes complicated due to the fact that you cannot localize non-commutative rings. There is a class of non-commutative rings that localize well - rings of differential operators.
