Why did Hashem 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 Hashem for leading him there and then immediately forcing him to leave, a test that he passed with flying colors. 1
Ramban: Hashem was indeed testing him - whether he would have faith in Him and trust that He would provide for him in Eretz Cana'an. And he failed. 2
How did Avraham abandon the Land, after Hashem 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 Hashem 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, Hashem 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 Hashem, "va'Avarechecha - with wealth" (Rashi to 12:2)
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 Hashem later specifically guaranteed to Yitzchak).