A Villager is a passive NPC who spawns and lives in the villages. They spawn around the villages and inside the buildings. As of December 19th, 2012, Villagers were introduced into the Minecraft: Xbox 360 Edition in the TU7 (1.01) update. The other variants were introduced in TU14.
Their characteristic look is dominated by their large, bald heads, green eyes, unibrows, and large 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.
Villagers will randomly wander around the villages, they do not fight back when attacked, nor will they run away from any Mob but the Zombie. The death of a villager does not affect any other villagers behavior. Villagers can use doors and ladders and will hide in their houses during the night. Zombies will attack villagers at night-time. Villagers prefer living in well lit areas, mainly because Zombies won't spawn. The Villagers will 'socialize' with other Villagers and Passive Mobs. If they approach each other and stand still then this means they're socializing. They can socialize with the player too, if they come up to you and stand still while bobbing their heads then they are socializing. Villagers are also attracted to Pumpkins and doors. When trapped, Villagers will try to find the easiest means of escape, if a house has no roof, 2 block walls and a bed then they will jump on the bed in an effort to escape. In other instances, Villagers will try to jump over obstacles. Villagers will also not willingly jump off cliffs. Villagers can breed if a village has at least one house with a door.
Iron Golems are commonly around villagers, the Villagers will stare at them, and sometimes the golems will offer them a rose, symbolizing the friendly relationship between them. Baby Villagers tend to run around the village, they also appear to play tag. If a baby Villager grows up while they are playing. The grown-up Villager will continue playing until they stop for a break, it will then continue on with a normal life. If a Baby Villager is offered a rose by a golem, it will slowly walk to it, take the rose, and run off.
Villagers will 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 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).
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.
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.
As of TU14 the the player has the ability to trade with villagers. This is the only way to get emeralds without cheating in pre-TU14 worlds.
As of TU14 villagers have different professions.
Brown cloak = Farmer
They have trades such as 17 to about 24 wheat for a emerald, and a emerald for 6 to 8 melons, 3 or 4 bread, and more.
White apron = Butcher
Buys raw beef and pork crops, sells leather armor.
Black apron = Blacksmith
Buys coal, iron, and diamonds, and sells any kind of armor and iron/diamond tools and weapons.