People will move into your town as long as there is room and the satisfaction level is positive. They will move out if the satisfaction level is negative. Basically the satisfaction level is the total satisfaction points minus the population, so you want to have more satisfaction points than space in your city.
You start out with 40 people and room for 20 more, and 196 satisfaction points. You usually increase room by building up your town hall, and you get more satisfaction points from building and stocking your tavern and your museum, but there are also a few researches that increase one or both.
You can temporarily lose satisfaction points if you have corruption or war protesters in your city. War protesters can be avoided by checking before you raid or occupy an enemy town to make sure you don't have any treaties with that town. Corruption is dealt with by building up your Governor's Residence.