When nighttime draws near and aggressive mobs start to spawn, a few villagers will run into their houses. Some villagers will remain outdoors around the village until zombies begin to chase them around. When chased, villagers will run into the nearest house, even if it's already inhabited by other villagers, and close the door behind them.
Zombies will pound on the doors of buildings in an effort to break-in. If the game is set to Hard difficulty, zombies will eventually break down the door, and attack villagers as they flee. Usually, a group of zombies will gather around the door to a single building, leaving other houses open for villagers to run into. Zombie Villagers may also appear when a villager is killed by a zombie (50% chance on normal difficulty and 100% on hard). If a baby villager is killed during a siege, it may become a baby zombie villager.
When this game mechanic was added, it was accompanied by the addition of a village-defending mob: the iron golem. Iron golems will only spawn in a village containing at least 21 doors, which is inhabited by 10 or more villagers (they can also be made by players). A golem will attack any zombies on sight.
Iron golems were added in the 12w08a snapshot a week later.
As of snapshot 12w32a, zombies are now potentially stronger because of the addition to mob armor and mob weaponry.