"He lives in a village."
Translation:Il vit dans un village.
There isn't a surefire way of determining whether a noun is feminine or masculine; your best bet is to memorize the singular indefinite article (un or une) that accompanies the noun. Just think of it as a part of the word.
That said, there are certain endings that are typically masculine and others that are typically feminine. Here is an excellent post, Duolingo: Noun genders in french
Vivre and habiter can often be used interchangeably, with the exception being that animals can "vivent" in a certain location, but only people "habite" in a location.
Demeurer most commonly means "to stay" or "to remain," in the both the figurative and literal sense.
Edited to add: "Demeurer" can also mean to dwell, so that could also be a possibility.