In Matthew chapter 16, the Lord speaks about the end times, saying:
Matthew 16:27
27 For the Son of man shall come in the glory of his Father with his angels; and then he shall reward every man according to his works.
This identified Him as the Lord God, as He is referencing a prophecy given in Proverbs 24:12.
He later said the same thing at the very end of Revelation:
Revelation 22:12
12 And, behold, I come quickly; and my reward is with me, to give every man according as his work shall be.
Those who teach that one's behavior determines whether or not they go to Heaven will use these verses as a proof text, asserting that the "reward" being spoken of is entrance into Heaven.
Both passages mention a "reward" for "works". Therefore, if the "reward" is Heaven, we get to Heaven by our "works". The Bible says:
Ephesians 2:8-9
8 For by grace are ye saved through faith; and that not of yourselves: it is the gift of God:
9 Not of works, lest any man should boast.
Since we are "saved through faith", "not of works", and "not by works of righteousness which we have done" (Titus 3:5), the "reward" spoken of in the passages in question cannot be referring to Heaven. The above says that we are saved (from our sins - Matthew 1:21) by "grace", which by definition, excludes all works:
Romans 11:6
6 And if by grace, then is it no more of works: otherwise grace is no more grace. But if it be of works, then it is no more grace: otherwise work is no more work.
Therefore, works have no part in whether we get to Heaven, at any point. We are either saved entirely by grace, or entirely by works - and the second option is a Biblical impossibility (Romans 3:10, 3:23, Galatians 3:11, etc.).
And finally, notice in Ephesians 2:8 that Salvation is called a "gift", not a "reward", because it is free, whereas a "reward" is something given in exchange for some effort - as the passages in question say - "according to work". God referring to Salvation as a "gift", and a "free gift", rather than a "reward", is the subject of the article entitled Eternal Life is Called a Gift for a Reason.
If we are saved by works, Christ came to earth, and died, for absolutely no reason whatsoever, because "if righteousness come by the law, then Christ is dead in vain" (Galatians 2:21). The "works" for which one can expect to be "rewarded" are absolutely encompassed in the Law, because the Law is the very standard of righteousness (1 John 3:4).
If the "reward" is not Heaven, what is it?
For non-believers, the "reward" (recompense) awaiting them will be Hell (John 3:18, 3:36). Therefore, if any lost man is rewarded "according to his works", they are actually receiving punishment for their sins, because "without faith it is impossible to please" God (Hebrews 11:6).
For believers, the rewards that they receive will vary depending on the works that they did after they were saved. The extent to which they are rewarded will be decided at the Judgment Seat of Christ, which only determines rewards, not whether or not they will be saved from Hell:
2 Corinthians 5:10
10 For we must all appear before the judgment seat of Christ; that every one may receive the things done in his body, according to that he hath done, whether it be good or bad.
1 Corinthians 3:14-15
14 If any man's work abide which he hath built thereupon, he shall receive a reward.
15 If any man's work shall be burned, he shall suffer loss: but he himself shall be saved; yet so as by fire.
This topic is covered in much more detail in the article entitled The Bible's Teaching on Eternal Rewards, if you'd like a more thorough survey of this doctrine.
These verses do not teach that someone can get to Heaven based on some nebulous amount of good works, because no verse in the Bible teaches that.
Yet, you won't be surprised to see others use these passages to teach that without works, you won't get to Heaven, all the while, of course, fiercely denying that they are teaching works Salvation. Hopefully, this article has given you some good information to respond with.