In order to reach Heaven, we must have the grace of God. Beyond what we have when we enter this world, we need divine grace in order to reach everlasting life in the world to come. The main source of this grace is the sacraments, beginning with Baptism. And the most important of the sacraments to keep us spiritually alive and well is the Holy Eucharist.
But the sacraments alone are not enough. We must cooperate with the graces we receive. God keeps giving us constant illuminations of the mind and inspirations of the will, and we must respond to these divine visitations. We must be mentally alert to what God is telling us He wants. And we must be ready with our wills to choose what He tells us to do.
The English word "morality" is misleading. We speak of something a person does as "moral" or "immoral," to describe something "good" or "bad." Properly speaking, however, EVERY action we perform with conscious awareness of what we are doing, and freely choose to do it - is a moral action. These are therefore morally good and morally bad actions. If the action is done consciously and voluntarily, (in other words, if we know what we are doing and freely do it anyway), it is a moral action. And if we choose to do is what God wants us to do, it is morally good. Otherwise it is morally bad.
If we further ask: Why does God want us to do certain things? The answer is because He knows that certain actions will lead us to heaven. Our main task on earth is to decide with our minds and choose with our wills what God tells us us will bring us to heaven, Nothing else really matters during the few years we have between birth and death. Our main purpose is to live a good moral life here, so we may enjoy a happy eternal life hereafter!
Source: Fr. John A. Hardon, S.J.