Our life on this earth has a specific purpose; it is not the result of nature's accident, nor is it a punishment for eating the fruit of the forbidden tree. We are here according to God's plan: the wordly life is a test; it is a chance to prove ourselves as deserving of the eternal blissful life in the hereafter. God did not create us just for few years of this life. To be created just for this world's life would amount to a joke played by the Creator with the human species. Muhammad, the Prophet of Islam, said," You have not been created to perish; on the contrary, you have been created for eternal life."
According to Islam, the final destination of mankind is the life hereafter. At the end of time, all human beings will be resurrected and will be held accountable for their wordly life. The life in hereafter will be an eternal life. However, whether it will be blissful or full of sorrow depends on how we spend our present life.
It was to help mankind in achieving this objective that God sent various prophets and messengers to guide them. Muhammad is the last prophet, and Islam is the final and complete version of God's message.