Representing localization as a direct limit
Make $S$ into a category as follows: The object set is $S$. A morphism $s \to t$ is an element $u \in S$ such that $us=t$. For identities and composition use that $S$ is multiplicative. If $u : s \to t$ is a morphism, then there is a unique homomorphism of $A$-algebras $A_s \to A_t$ (because of the universal properties). The colimit $\mathrm{colim}_{s \in S} A_s$ has the same universal property as $S^{-1} A$, hence they are isomorphic. All this works for arbitrary commutative rings $A$.
Let $A$ be a commutative ring and $S$ a multiplicative set. Then the family of rings $\left\{A_s \right\}_{s \in S}$ forms a directed family. To see this, first we define a partial order on $S$ by $s \le t$ if $t = u s$ for some $u \in S$. Next for $s \le t$ with $t = u s$, there exists a ring homomorphism $f_{s,t}: A_s \rightarrow A_t$, which is defined by $f(a/s^n) = a u^n / t^n$. Prove as an exercise that the transitive property of a directed family holds. Thus we can talk about $\lim_{s \in S} A_s$.
Recall that $\lim_{s \in S} A_s = \bigsqcup_{s \in S} A_s / \sim$, where $\bigsqcup_{s \in S} A_s = \left\{(\xi,s) : \, s \in S, \xi \in A_s \right\}$ is the disjoint union and $\sim$ is the following equivalence relation on $\bigsqcup_{s \in S} A_s$: Two elements $(a_1/s_1^{n_1},s_1)$ and $(a_2/s_2^{n_2},s_2)$ are equivalent if there exists $s_3 \in S$ such that $s_1 \le s_3, s_2 \le s_3$ and $f_{s_1,s_3}(a_1/s_1^{n_1}) = f_{s_2,s_3}(a_2/s_2^{n_2})$. We can denote an element of $\lim_{s \in S} A_s$ as $[a/s^n,s]$, i.e. the equivalence class of $(a/s^n,s)$.
Now define a map $\psi:\lim_{s \in S} A_s \rightarrow A_S$ by taking the element $[a/s^n,s]$ to $a/s^n \in A_S$. As an exercise show the following: 1) $\psi$ is well-defined, 2) $\psi$ is a ring homomorphism, 3) $\psi$ is bijective.