Suppose $K$ is some nice space, for example $\mathbb R$ or $\mathbb C$. Let $X$ be a set and $C$ a ring of functions $X \to K$. Is there any way to determine, from the algebraic structure of $C$, whether there exists a topology $\tau$ on $X$ under which $C$ is exactly the ring of continuous $K$-valued functions on $(X,\tau)$?
In the simplest case I can think of, we might restrict our question to when we want $(X,\tau)$ to be a compactum. Then we should be able to recover the points of $X$ from the maximal ideals of $C$, which would have to be indexed by the points of $X$. The ideal $I_x = \{f \in C \colon f(x)=0\}$. For that idea to exist at all I think it's enough that some function in $C$ vanishes at each $x \in X$.
But what if the topology is not required to be compact? Is anything known about this question? Is there any more easily-checkable answer beyond, "Equip $X$ with the weak topology generated by $C$ and see if there are any other continuous functions"?
Edit: Of course some spaces share a ring of continuous functions. Any non-realcompact space has the same function ring as its realcompactification, and as every intermediate space. So it is possible that the topology $\tau$ may not be unique. My question is not about finding the topology itself, but just about showing one exists at all.