The three-week period that begins with the fast of the 17th of Tamuz and climaxes with Tish’ah B’Av, is known as The Three Weeks. It is a time of mourning and reflection for the destruction of both the First and Second Temples in Jerusalem, as well as many other tragedies that befell klal Yisrael over the course of history. In order to internalize and grow from the memory of these calamities, Chazal instituted increasing degrees of mourning practices during this period.
For example, we don’t conduct weddings, play musical instruments or listen to music, and recite the She’hecheyanu blessing; and most Ashkenazim don’t get haircuts or shave.
Rav Yosef Dov Soloveitchik explains that the period of the Three Weeks is designed to gradually bring the destruction of the Beis HaMikdash into the center of our consciousness. Proper observance of these halachos prepares us to take the next step and begin to experience a true sense of aveilus during the Nine Days and through Tish’ah B’Av. It is only through the meticulous observance of the halachos of mourning for the Beis HaMikdash that we can reasonably hope to merit seeing the rebuilding of the Beis HaMikdash in our lifetime.