One person making one move can be described with either word, depending on where the writer is standing. Someone who leaves Ireland for Canada emigrated from Ireland and immigrated to Canada. The prefixes carry the direction, and once you notice that, the pair stops being confusing.
A verb. To leave your own country to settle permanently elsewhere. Pairs with "from."
A verb. To come into a country to settle permanently. Pairs with "to."
Quick way to remember
Look at the prefix. "E-" means out, as in exit — you emigrate out of a place. "Im-" means in, as in import — you immigrate into one. Whichever preposition the sentence uses, "from" or "to," will tell you which word belongs.