Some Villagers will move out after being in your town for a while. It is possible for them to move out almost immediately after moving in. Villagers can be persuaded to not move out by talking to them and selecting the appropriate response. There will be warning one day in advance that a villager is moving by their house being filled with boxes.
Villagers can be "traded" by Wi-Fiing with another player and hoping that they move to their village, provided the receiving player has an empty house, and the giving player has a villager moving out.
Animals move in at the start of the game, one at a time, slowly. The Town will start off with three villagers, and slowly increase to a maximum of ten. When talking to a villager moving in, they will introduce themselves and be pleased to meet you. If you continue to talk to them, they will tell you to come back later, as they are too busy.