G-d said to Moses, "Take Joshua son of Nun, a man of spirit, and lay your hand upon him."
Bamidbar 27:18
Joshua was chosen as Moses' successor by virtue of his consummate diligence in absorbing Moses' instruction -- both from the Torah that Moses taught and through Moses' personal conduct.
The difference in their leadership was that Moses' was largely based on miracles whereas Joshua's was conducted naturally. Therefore, it was specifically through Joshua's leadership that the purpose of Creation -- to sanctify the natural, mundane world -- was fulfilled. But Joshua succeeded only because he was a selfless reflection of Moses; his selflessness enabled the miraculous nature of Moses' leadership to carry over into his own, natural leadership. Thus, Joshua's first conquest, the city of Jericho, occurred miraculously.
From Joshua we learn to be fully committed both to humbly absorbing and transmitting the heritage and lessons of the Torah as they have been handed down to us by our predecessors, and to applying the Torah's teachings to the novel situations of our generation.
--From Kehot's Daily Wisdom