We are on earth in order to know and to love God, to do good according to his will, and to go someday to heaven.
To be a human being means to come from God and to go to God. Our origin goes back farther than our parents. We come from God, in whom all the happiness of heaven and earth is at home, and we are expected in his everlasting, infinite blessedness. Meanwhile we live on this earth. Sometimes we feel that our Creator is near; often we feel nothing at all. So that we may find the way home. God sent us his Son, who freed us from sin, delivers us from all evil, and leads us unerringly into true life. He is “the way, and the truth, and the life” (Jn 14:6).
From the Catholic Youth Catechism (question 1)