There are a number of reasons for the migration of people from rural areas to urban areas. These include employment opportunities, educational facilities, lifestyle preferences, better medical care, social and personal life opportunities, etc. Any one or a combination of these factors may cause migration. Most of the rural areas around the world are dependent on agriculture and may not provide adequate employment opportunities for everyone in the family (depending on the size of the land). Urban areas, on the other hand, have more employment opportunities in various sectors (such as manufacturing, services, etc.). Urban areas also typically boast better educational and medical care facilities. People may find the former to be more attractive for their offspring, while the latter may be beneficial to their parents. Urban areas also provide more chances for social interaction, a better personal life and a higher standard of living. All these factors may cause people to shift to urban areas.
On the other hand, some people may decide to shift to rural areas (from urban areas) because they are not satisfied with the rapid pace of urban life and want a more peaceful existence.
Hope this helps.