Categorical Interpretation of Localization At the very beginning of Ravi Vakil's amazingly famously amazing and famous notes on algebraic geometry, he remarks that some familiarity with localization and prime ideals is useful. I don't know anything about commutative algebra, so I was hoping for a categorical interpretation of both these concepts, or at least a nice conceptual summary from a structural viewpoint. Sources and references kindly accepted (as low level as possible please).
 A: The localization of a ring $A$ at a multiplicative submonoid $S$ is the initial ring under $A$ in which $S$ is sent to units. (i.e. there's a localization map $A\to S^{-1}A$ and if $S$ goes to units in $f:A\to B$ then $f$ factors uniquely through $A\to S^{-1}A$.) Diagrammatically, a unit is just an element whose action by multiplication is an isomorphism.
A prime ideal $\mathfrak{p}$ is one for which the quotient $A/\mathfrak{p}$ is an integral domain, that is, a ring in which all of the endomorphisms given by multiplication by an element are monomorphisms. In this interpretation it's not immediately obvious that the complement of a prime ideal is a multiplicative submonoid, but it is, and this is the most important kind of submonoid at which one localizes.
A: Any ring can be viewed as an additive category with one object and the endomorphisms of that object given by the elements of the ring.  Then Gabriel-Zisman localization applied to this special case recovers the usual localization of a ring at a multiplicative subset of elements.  This makes sense even when the ring is not commutative, and then one recovers Ore localization of an associative ring.  As a reference for Gabriel-Zisman localization, I would recommend the classic book with the same authors, called "Calculus of fractions and homotopy theory".
