I gather that rings of germs of functions at a point $p$ on a manifold/variety/etc. are local with the maximal ideal containing exactly the germs of functions which vanish at $p$. So in some sense, these rings, which happen to be local, describe the local behavior of functions. But what about other local rings? $\mathbb Z/p^n\mathbb Z$ is local for primes $p$ and $n\geq1$. Can we interpret it as a ring of germs of functions on some space?
I found a way to do so for fields $F$, at least. They can be seen as the ring of functions (or germs thereof, makes no difference in this case) on a one-element topological space $\{p\}$, where $x(p):=x$ for all $x\in F$. Which seems like it would make sense in a context where local rings actually are rings of germs: local rings with trivial maximal ideal (fields) are germs of functions on a trivial space. But how to generalize this?
Depends on your definition of "function". The following answer is based on the notion of schemes in algebraic geometry.
A function on (a scheme) $X$ is a morphism $X\to\mathbb{G}_a$, where $\mathbb{G}_a=\mathrm{Spec}(\mathbb{Z}[t])$ (where $t$ is a "canonically" chosen variable). Added: Here canonically means that one cannot replace $t$ by another generator of $\mathbb{Z}[t]$ as a ring.
For the case $X=\mathrm{Spec}(R)$, this is amounts to a map $\mathbb{Z}[t]\to R$.
The points of the space $\mathrm{Spec}(R)$ are prime ideals in $R$. Added: The basic open sets (used to define germs of functions) in $\mathrm{Spec}(R)$ are of the form $D(a)=\{\mathfrak{p} : a\not\in\mathfrak{p}\}=\mathrm{Spec}(R_a)$ for various $a$ in $R$.
The "ring of germs of functions at a point" of the scheme $\mathrm{Spec}(R)$ is $R_{\mathfrak{p}}$ where $\mathfrak{p}$ is a point of the scheme $\mathrm{Spec}(R)$.
Note that if $R$ is a local ring and $\mathfrak{m}$ is its maximal ideal, the n $\mathfrak{m}$ is also a prime ideal of $R$ and $R=R_{\mathfrak{m}}$.