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}}$.