Why did HaSh-m send a famine specifically in the area where Avraham was living, after having instructed him to go to Eretz Kena'an?
Rashi: This was to test Avraham, to see whether he would question Hash-m for leading him there and then immediately forcing him to leave, a test that he passed with flying colors. 1
Ramban: HaSh-m was indeed testing him - whether he would have faith in Him and trust that He would provide for him in Eretz Kena'an. And he failed. 2
How did Avraham abandon the Land, after HaSh-m had commanded him to be there? Bava Kama 60b and Yalkut Shimoni learn from Avraham that when there is hunger in one's location, one should travel. If so, Avraham acted properly. Gur Aryeh (to 26:2) adds: as long as HaSh-m did not command otherwise (as He later commanded Yitzchak).
What did this episode signify, in terms of "What happened to the fathers is an indication of what will happen to the children"?
Ramban: Avraham went down to Egypt to sojourn there 1 due to the famine. When the Egyptians harassed him due to his wife, HaSh-m punished them with plagues and took them out with a lot of wealth. Moreover, Pharaoh sent men to accompany him when he left - an exact precursor of what would happen with regard to the slavery in Egypt and the redemption.
But not to live there permanently (Seforno).
Hadn't Avraham already been blessed by HaSh-m, "va'Avarechecha - with wealth" (Rashi to 12:2) - including sustenance?
Gur Aryeh (to 26:2): Avraham left only when forced to by the famine, for there was no guarantee of blessing even during a time of famine (as HaSh-m later specifically guaranteed to Yitzchak).