Space modelled on ring I am learning some deformation theory. The dimension of the moduli space for some deformation problem is bound by the dimension of (usually) the first cohomology group of the object that is to be deformed.
If $X$ is a complex manifold with infinite-dimensional first cohomology and no second cohomology (i.e. no obstructions), the space of first-order deformations is infinite-dimensional. For a particular example, this cohomology is infinite-dimensional over $\mathbb C$, but finite-dimensional over some ring of functions.
It would make sense to think of the moduli space as a space modelled on this ring of functions (because then it would be "finite-dimensional", which presumably is a nicer space). My question is: Is there a concept for spaces which are modelled on rings/modules, that generalize manifolds/varieties which are usually modelled on fields/vector spaces?
 A: It seems likely to me that you are looking for the notion of scheme (or its generalisations), so I will briefly explain what they are. I will assume you know at least the definition a sheaf on a topological space.
Definition. A locally ringed space is a pair $(X, \mathscr{O}_X)$ where $X$ is a topological space and $\mathscr{O}_X$ is a sheaf of commutative rings on $X$ such that every stalk of $\mathscr{O}_X$ is a local ring (i.e. has a unique maximal ideal). A morphism of locally ringed spaces $(X, \mathscr{O}_X) \to (Y, \mathscr{O}_Y)$ consists of a continuous map $f : X \to Y$ together with a sheaf-of-rings homomorphism $f^{\sharp} : f^{-1} \mathscr{O}_Y \to \mathscr{O}_X$, where $f^{-1}$ denotes the pullback operation on sheaves, such that for each point $x$ in $X$, the induced homomorphism $\mathscr{O}_{Y, f(x)} \to \mathscr{O}_{X, x}$ sends non-invertible elements in $\mathscr{O}_{Y, f(x)}$ to non-invertible elements in $\mathscr{O}_{X, x}$. An open subspace of a locally ringed space $(X, \mathscr{O}_X)$ is a locally ringed space of the form $(U, \mathscr{O}_U)$, where $U$ is an open subset of $X$ and $\mathscr{O}_U = \mathscr{O}_X |_U$.
Example. If $X$ and $Y$ are smooth manifolds and $\mathscr{O}_X$ and $\mathscr{O}_Y$ are the respective sheaves of smooth functions, then a morphism $(X, \mathscr{O}_X) \to (Y, \mathscr{O}_Y)$ is precisely the same thing as a smooth map $X \to Y$. The situation for complex manifolds is a little more subtle, however. In both cases, the open subspaces are precisely the open subsets with the induced smooth/complex manifold structure.
*Theorem.*$\DeclareMathOperator{\Spec}{Spec}$ For every commutative ring $A$, there exist a locally ringed space $(\Spec A, \mathscr{O}_{\Spec A})$ and a ring isomorphism $A \cong \Gamma (\Spec A, \mathscr{O}_{\Spec A})$ such that, for every locally ringed space $(X, \mathscr{O}_X)$, the map that sends a morphism $(X, \mathscr{O}_X) \to (\Spec A, \mathscr{O}_{\Spec A})$ to the ring homomorphism $A \cong \Gamma (\Spec A, \mathscr{O}_{\Spec A}) \to \Gamma (X, \mathscr{O}_X)$ is bijective onto the set of all ring homomorphisms $A \to \Gamma (X, \mathscr{O}_X)$.
Example. If $k$ is a field, then $\Spec k$ is a point, and $\mathscr{O}_{\Spec k}$ is just $k$ itself. Thus, a morphism $(\Spec k, \mathscr{O}_{\Spec k}) \to (X, \mathscr{O}_X)$ is the same thing as a point $x$ in $X$ and a ring homomorphism $\mathscr{O}_{X, x} \to k$. Such a morphism is said to be a $k$-valued point of $X$.
Definition. An affine scheme is a locally ringed space isomorphic to one of the form $(\Spec A, \mathscr{O}_{\Spec A})$ for some commutative ring $A$. A scheme is a locally ringed space that admits an cover by open subspaces that are affine schemes. A morphism of schemes is a morphism of locally ringed spaces.
It is customary to abuse notation and refer to a scheme $(X, \mathscr{O}_X)$ just by the space $X$, omitting mention of the structure sheaf $\mathscr{O}_X$; similarly, one often omits mention of the sheaf-of-rings homomorphism $f^\sharp$. We henceforth adopt this simplified notation.
The most important contribution of Grothendieck is the so-called ‘relative point of view’, which tells us to regard a morphism of schemes $f : X \to Y$ as a family of spaces “continuously” parametrised by $Y$ (in much the same way as one might think of fibre bundles).
Accordingly, let us fix a base scheme $S$, which will often be an affine scheme or even $\Spec k$ for some field $k$.
Definition. An $S$-scheme, or scheme over $S$, is a morphism of schemes $X \to S$. A morphism of $S$-schemes $(X \to S) \to (Y \to S)$ is a morphism $X \to Y$ making the evident triangle commute. An $S$-point of an $S$-scheme $X \to S$ is a morphism $(S \to S) \to (X \to S)$, i.e. a morphism $S \to X$ such that the composite $S \to X \to S$ is the identity.
For deformation theory, my understanding is that one often studies schemes over bases like $S = \Spec \mathbb{C}[\epsilon] / (\epsilon^2)$, which is an infinitesimal thickening of the point $\Spec \mathbb{C}$. Although $S$ is topologically just a point as well, we can see that $S$ carries some extra structure by noting that a morphism $S \to X$ is essentially the same thing as a $\mathbb{C}$-valued point of $X$ together with a specified tangent vector.
There are also bases like $S = \Spec \mathbb{C}(t_1, \ldots, t_n)$, where $\mathbb{C}(t_1, \ldots, t_n)$ denotes the field of rational functions over $\mathbb{C}$ in $n$ variables. This too is topologically a point, but one usually thinks of a scheme over this $S$ as being the generic fibre of some scheme over $n$-dimensional complex affine or projective space. For example, one can define a generic elliptic curve over the function field $\mathbb{C}(t_1, t_2)$, where $t_1$ and $t_2$ correspond to the two parameters in the Weierstrass equation.
