The verb migrate comes from Latin (migrare) and means to move from one place to another. It is often used to refer to the seasonal migration of animals, but it can also be used more loosely to mean any act of resettlement or relocation.
The Canada geese are migrating south.
Many unemployed farm works have been migrating to the big city.
Some students migrated to the back of the class.
To emigrate means to leave one country in order to settle in another. The e comes from Latin ex, which means out of (as in exit).
My grandparents emigrated from Austria in the 1930s.
To immigrate means to enter into another country with the goal of settling permanently. The “im” prefix comes from Latin in, which, not surprisingly, means in or into.
We immigrated to India three years ago.
All three words are usually used as verbs, but they also have other forms. For instance, we can speak of migratory birds (adjective), migration (noun), and immigrant (noun).
The most important thing to remember is that emigrate means to move out of a country, whereas immigrate means to move into a country. Usually the one implies the other, and usually the goal is some type of permanent resettlement and citizenship.