Motivation for rings of fractions? I'm learning about rings of fractions and localization. I like the material a lot and feel engaged with it, but I do lack a broader perspective on things. For example, I'm aware of things such as $S^{-1}A$ is the "best" ring for making everything in $S$ a unit (via the universal property), or that localization at a prime ideal gives us a local ring. 
These are certainly nice things to have, but I'm wondering if there's a relatively simple example in algebraic geometry or number theory which will demonstrate the usefulness of these notions. 
(In particular, a common comment I don't understand yet is along the lines of how constructing rings of fractions is analogous to "concentrating attention to an open subset or near a point." My understanding of algebraic geometry is still very vague at this point and includes only very basic facts about varieties and their correspondence with ideals.)
 A: The use of fraction rings is used in the very foundations of modern algebraic geometry, namely in scheme theory.
The basic building block in that theory is the affine scheme $X=\operatorname {Spec}(A)$ associated  to an arbitrary commutative ring $A$.
The scheme $X$ comes with a topology,  a canonical basis $(D(f))_{f\in A}$for that topology and, above all, with a sheaf of  rings $\mathcal O_X$ which associates to  every $D(f)$ the ring of sections $\Gamma(D(f),\mathcal O_X)=A_f$ .
The relevance to your question is that the above ring is the  ring  of fractions $A_f:= S_f^{-1}A$ associated to the multiplicative monoid $S_f= \{1,f,f^2,f^3,\cdots\}$.
Moreover the points of the topological space $X$ are the prime ideals $\mathfrak p\subset A$ and the stalk $\mathcal O_{X,\mathfrak p}$ of $\mathcal O_X$ at $\mathfrak p$ is the ring  of fractions $A_\mathfrak p=S_\mathfrak p ^{-1}A$, where  $S_\mathfrak p$ is the multiplicative monoid $S_\mathfrak p=A\setminus \mathfrak p$. 
A: A "relatively simple example in number theory" is the following. The ring $A=\mathbb{Z}$ localised at the ideal generated by a prime $p$, with $S=A\setminus (p)$, gives the ring $\mathbb{Z}_{(p)}$ of $p$-local numbers, whose completion are the integer $p$-adic numbers $\mathbb{Z}_{p}$. It's field of fractions are the $p$-adic numbers $\mathbb{Q}_p$. These are important rings and fields in number theory.
A: Consider the affine space $\mathbb{A}^2$. It can be shown that the regular functions on $\mathbb{A}^2$ are the polynomials $k[x,y]$. Now consider the curve $Y$ of $\mathbb{A}^2$ given by the equation $x^2-y = 0$. Suppose we are not interested at all in this curve and we want to remove it from our space, i.e., we want to work inside the open set $U = \mathbb{A}^2 - Y$. It is reasonable to want to know what are the regular functions on our open $U$. As one may guess, the regular functions on $U$ are the regular functions on $\mathbb{A}^2$, but are now "enhanced", in the sense that we can divide any element of $k[x,y]$ with any power of the polynomial $x^2-y$: since we are working outside $Y$ this is a valid operation. Formally, the ring of regular functions on $U$ is the localization of $k[x,y]$ at the element $x^2-y$. 
