Appearance
Their characteristic look is dominated by their large, bald heads, green eyes, unibrows, and elephantine noses. Villagers' arms are implied to be jointed, with two parts each to create folded arms. The arms are tucked inside the sleeves, with the sleeves touching at the seam in the middle.
There are different types, distinguished by the color of their robes, which signify their role in the community. There are 6 unique skins for the villagers which are found in the minecraft.jarfile, but the generic green robe villager is not used in the game on normal maps. Hood texture files are also present, but no mesh currently exists to display them.
Spawning
Villagers only spawn naturally in NPC Villages. They can also be spawned with spawn eggs in creative mode. They will never despawn even if the player wanders away from them. Unlike other mobs, they won't leave their village even without a barrier (such as a fence) preventing them from doing so.
Villagers can also spawn if the player uses a splash potion of weakness on a Zombie villager and feeds it a regular golden apple. It will then turn into a villager. This tactic can be useful to repopulate villages, to add more citizens, and to create a village if you can't find one.
Behavior
Villagers have the ability to utilize doors and are therefore able to go in and out of houses. Villagers will hide in houses during the night, rain, or when chased by Zombies. Although it never rains in desert biomes, desert villagers will still attempt to hide from the rain; this means they are actually hiding from places which zombies can access.Villagers will randomly wander around the area of the village. They have no attack, but they do run from zombies and hide in their homes. A death of a villager does not affect nearby villagers' behavior, though if a player's popularity in the village is low, any natural Iron Golems nearby will attack the player. As of 1.6, villagers will frequently make nasal grunting noises, further emphasizing players' ideas that they were modeled after Squidward from the Spongebob Squarepants television series, as Squidward always speaks with a nasal voice due to his large nose.
Villagers decide which houses they like. They seem to favor well lit conditions over dimly lit ones, seemingly due to the lower chance of zombie spawning. Villagers favor houses over well lit outdoor areas, even if the house is completely unlit. This is probably due to the fact that zombies cannot access houses. Villagers will climb stairs and climb ladders just as a player would.
If all doors in a village are covered so that villagers may not enter and the time is night, they will carry on with their normal business as if it were day time. If all doors are covered but one at night, the villagers will avoid it, for some reason (probably a bug).
If a house similar to those that naturally occur in a village is being built by the player, villagers seem to notice and will crowd around the structure as it is being built.
Zombies will find villagers from up to 31 block radius to attempt to break down their doors. Villagers will run away from zombies, which can attack the villagers. Zombie Sieges can occur between these mobs, and the villager's only "natural" defense are the Iron Golems, which protect villagers from nearby mobs. Zombies have a chance of turning a villager into a zombie villager if the difficulty is on Normal or Hard, or Hardcore gamemode.(Easy or Peaceful gamemode have 0% chance of villagers being infected. Normal is 50%, and Hard or Hardcore is 100%) This can also happen with baby villagers, resulting in Baby Villager Zombies or Baby Zombies.
The villagers will "socialize" with each other and passive mobs. This involves two villagers facing each other and making occasional sounds. Villagers can socialize with the player as well, if they approach and stand still (they will start moving their heads in a bobbing fashion). On some occasions, villagers will gather in a large group in one point in a village, seemingly without any cause. They are also attracted to doors.
When villagers are near an Iron Golem, they may stop and stare at it. The Iron Golems sometimes hold roses, seemingly to give to the villagers, symbolizing the friendly relationship between the villagers and Iron Golems.
Villagers also will not willingly fall off high cliffs. They will not stay away from fire or lava or change their behavior around fires. They will just carry on as usual, and rarely, but possibly, walk straight into the fire and cacti. They will not flee, run, or change their behavior when being damaged by fire or cacti.
Villagers now make sounds, which include being hurt, or making a trade.
There is evidence that villagers are prone to overcrowding certain areas of a village while leaving other areas completely empty. There is speculation that villagers will crowd predictably into set areas, however exactly which areas has still not been discovered[1]. The overcrowding can lead to villagers swarming into a few houses at night rather than spreading themselves. The sheer amount of villagers trying to enter such a small area can result in a portion of the villagers taking more time to enter the safety of their homes. In extreme cases, some villagers will become stranded outside. There is no known way to prevent this type of overcrowding. A portion of this behaviour is due to a bug. See issue MC-78 (below) for more details.
Mating and population
Once housing has been established, villagers will then mate until the number of adult villagers equals 35% of the number of doors. Any remaining children will grow up as usual, resulting in a total number of adult villagers somewhere above one third of the number of nearby wooden doors. The type of villager that the child is doesn't depend on what type the parents are, e.g., two farmer villagers can have a child that is any of the occupations. Unlike other breed-able mobs, the parents and child have no personal interactions other than socializing. It takes exactly 20 minutes for a villager-baby to grow up to an adult.Villagers will mate depending on the number of valid doors. A valid door is any door (within the city radius) where the number of "outside" spaces within 5 blocks (in a straight line) on one side of the door is not the same as the number of "outside" spaces within 5 blocks on the other side of the door. A space is considered to be "outside" if it is hit by the sun during the day, i.e. it is transparent, and has nothing but transparent blocks above it all the way to the sky. (This means that starting a village deep underground, such as in a cavern or buried ravine, is not feasible.) Notice that a door is not a valid door without a roof on one side, or with equal amount of roof on both sides. Sometimes the villager AI (such as mating and housing) doesn't behave as expected until the game is restarted (as in save and quit, then reload the world).
The game engine periodically takes a census to determine the current population of the village. All villagers within the horizontal boundary of the village and within 5 vertical blocks of the center will be counted as part of the population to determine if continued villager mating is allowed. However, any villager within the horizontal boundary of the village and within a vertical distance of 32 blocks downwards of the center of the village will attempt to enter mating mode as long as there is at least one villager within the boundary. Therefore, it is possible to create an unlimited population by holding only two villagers within the village boundary and forcing all other villagers outside the 5 block vertical range of the census. If two villagers simultaneously enter mating mode while they are close to one another, they will mate with each other and produce a child.
Villager children will sprint about, entering and leaving houses at will. The villager children will also chase each other around the village to simulate that they are playing tag. These children will sometimes stop sprinting to stare at an Iron Golem. If the Iron Golem is holding a rose, the children will cautiously take the flower from its hands. Villager children can be infected by Zombies. Zombie children will not burn in daylight and run faster. Villager children can be spawned by right-clicking an adult villager with a villager Spawn Egg.
Farming
Villagers can be farmed by enclosing two villagers in an area with a lot of doors. The villager children can then be grown up and traded with. Villagers cannot be traded with until they've matured to adulthood. The most efficient design is to make a stone pen surrounded by doors, as shown:

