A morphism of locally ringed space is a morphism of ringed spaces $(f,f^\sharp):(X,\mathcal{O}_X)\to (Y,\mathcal{O}_Y)$, where $f:X\to Y$, such that the comorphism$f^\sharp:\mathcal{O}_Y\to f_*\mathcal{O}_X$ is a morphism of local rings (that is, a map of rings which respects the maximal ideal (reflects invertibility)).
Examples
The category of smooth manifolds has a canonical inclusion into the category of locally ringed spaces. Indeed, any smooth manifold $M$ comes equipped with a sheaf of smooth real valued functions $\mathcal{C}^{\infty}_M$, and the maximal ideal in a given stalk consists precisely of germs of smooth functions which vanish at that point. Moreover, a smooth map $f: M \to N$ determines a comorphism $f^\sharp: \mathcal{C}^{\infty}_N \to f_* \mathcal{C}^{\infty}_M$ by the usual precomposition. In fact, the inclusion of smooth manifolds into locally ringed spaces is fully faithful. For a proof, see Lucas Braune’s nice answer on math stackexchange.
Schemes are usually thought of as locally ringed spaces.
On the locality condition
The condition that all stalks $\mathcal{O}_{X,x}$ are local rings can be reformulated without referring to the points of $X$:
The only open subset $U$ such that $\mathcal{O}_X(U)$ is the zero ring is $U = \emptyset$.
Let $f, g \in \mathcal{O}_X(U)$ be local sections such that $f + g$ is invertible in $\mathcal{O}_X(U)$. Then there is an open covering $U = V \cup W$ such that $f|_V \in \mathcal{O}_X(V)$ and $g|_W \in \mathcal{O}_X(W)$ are invertible. (It’s allowed that $V$ or $W$ are empty.)