A morphism of locally ringed space is a morphism of ringed spaces , where , such that the comorphism 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 comes equipped with a sheaf of smooth real valued functions , and the maximal ideal in a given stalk consists precisely of germs of smooth functions which vanish at that point. Moreover, a smooth map determines a comorphism 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 are local rings can be reformulated without referring to the points of :
The only open subset such that is the zero ring is .
Let be local sections such that is invertible in . Then there is an open covering such that and are invertible. (It’s allowed that or are empty.)