They move from areas of high population to areas of low population. The idea is if your region is maxed in pop, or close to it, and the region next door is low, the total population between the two regions will grow faster if some of your peasants move next door. I don't think it takes into account food supply, though I haven't seen peasants move into a region that was already starving.