Jesus Christ answers this question about works with his own words, though there are good scripture to posted here to support Jesus' words, best to ask the High Priest himself the answer.
Matthew 25:14 For the kingdom of heaven is as a man travelling into a far country, who called his own servants, and delivered unto them his goods.
Matthew 25:15 And unto one he gave five talents, to another two, and to another one; to every man according to his several ability; and straightway took his journey.
Matthew 25:16 Then he that had received the five talents went and traded with the same, and made them other five talents.
Matthew 25:17 And likewise he that had received two, he also gained other two.
Matthew 25:18 But he that had received one went and digged in the earth, and hid his lord's money.
Matthew 25:19 After a long time the lord of those servants cometh, and reckoneth with them.
Matthew 25:20 And so he that had received five talents came and brought other five talents, saying, Lord, thou deliveredst unto me five talents: behold, I have gained beside them five talents more.
Matthew 25:21 His lord said unto him, Well done, thou good and faithful servant: thou hast been faithful over a few things, I will make thee ruler over many things: enter thou into the joy of thy lord.
Matthew 25:22 He also that had received two talents came and said, Lord, thou deliveredst unto me two talents: behold, I have gained two other talents beside them.
Matthew 25:23 His lord said unto him, Well done, good and faithful servant; thou hast been faithful over a few things, I will make thee ruler over many things: enter thou into the joy of thy lord.
Matthew 25:24 Then he which had received the one talent came and said, Lord, I knew thee that thou art an hard man, reaping where thou hast not sown, and gathering where thou hast not strawed:
Matthew 25:25 And I was afraid, and went and hid thy talent in the earth: lo, there thou hast that is thine.
Matthew 25:26 His lord answered and said unto him, Thou wicked and slothful servant, thou knewest that I reap where I sowed not, and gather where I have not strawed:
Matthew 25:27 Thou oughtest therefore to have put my money to the exchangers, and then at my coming I should have received mine own with usury.
Matthew 25:28 Take therefore the talent from him, and give it unto him which hath ten talents.
Matthew 25:29 For unto every one that hath shall be given, and he shall have abundance: but from him that hath not shall be taken away even that which he hath.
Matthew 25:30 And cast ye the unprofitable servant into outer darkness: there shall be weeping and gnashing of teeth.
Now the point of the parable is very simple, Jesus left this world when he died and rose from the dead, but there is still work to do as the Christian faith needed to be spread and the good news preached to all the world. So he left Christian workmen to finish his works he started when he was alive some God gives many works (5 talents) because they can handle it, others God gives few works (2 talents) because that is all they can handle, then others God gives very few works (1 talent) because they do not have a very strong faith but he wants to give them a chance to prove themselves. Those strong in their faith will use their spiritual gifts to do works equal to the gifts and found worthy to enter Heaven because they stayed true to God, while others "buried" their gifts and never used them to do works so when they stand before God the "unprofitable servant" will be crying as he is sent to hell.
Works is not about earning Heaven, as was stated by many in this thread, it is about not being ashamed of Jesus Christ and God the Father. If you see a Christian falling off the path and starting to be taken by satan, you can help them showing you are not ashamed of Jesus or God and showing that you have a good heart that will not stand to see a soul being killed by satan when you had a chance to save it. The other choice is you can keep walking to let their soul be killed by satan as he damns them to hell, because you are ashamed of being a Christian so want to put your "candle under a basket" or you have an evil heart and do not care that person's soul will die.
Mark 8:38 Whosoever therefore shall be ashamed of me and of my words in this adulterous and sinful generation; of him also shall the Son of man be ashamed, when he cometh in the glory of his Father with the holy angels.
Your application is very good
Technically, the parable was for Israel, to prepare and educate them about being fit to enter the kingdom of heaven, wherein they will reign on the earth.