A new birth is required for entrance into Heaven, as the Lord said "Except a man be born again, he cannot see the kingdom of God" (John 3:3-7).
We become born again as a child of God through simple faith in Jesus Christ as our Savior:
1 John 5:1
1 Whosoever believeth that Jesus is the Christ is born of God: and every one that loveth him that begat loveth him also that is begotten of him.
John 1:12 and Galatians 3:26 also testify to this fact - we are born again into God's family simply by putting our faith in Jesus Christ as our Savior.
The Bible teaches that when this happens, an entirely new person is born within us:
1 Peter 1:23
23 Being born again, not of corruptible seed, but of incorruptible, by the word of God, which liveth and abideth for ever.
This New Man, which is born of God, is incapable of sinning or displeasing God:
1 John 3:9
9 Whosoever is born of God doth not commit sin; for his seed remaineth in him: and he cannot sin, because he is born of God.
1 John 5:18
18 We know that whosoever is born of God sinneth not; but he that is begotten of God keepeth himself, and that wicked one toucheth him not.
2 Corinthians 5:17
17 Therefore if any man be in Christ, he is a new creature: old things are passed away; behold, all things are become new.
When our physical bodies die here on Earth, only this New Man will remain, which is why we will never have to worry about sinning in Heaven. Our new nature is physically incapable of sinning.
For believers in Jesus, it is vital to understand that even though we have a new nature, our old nature is still with us. Our physical bodies did not get redeemed when we got saved. We still have the same brain, the same arms, legs, etc. as we did before salvation. Our body won't be redeemed until Christ returns (Philippians 3:20-21: 1 Corinthians 15:52-53, Romans 8:23).
This Old Man will never inherit the kingdom of God. It is good for nothing (John 6:63, Romans 7:18), and never will be good for anything except death, which is why believers are told to put no confidence in the flesh (Philippians 3:3):
1 Corinthians 15:50
50 Now this I say, brethren, that flesh and blood cannot inherit the kingdom of God; neither doth corruption inherit incorruption.
The fact that our Old Man cannot enter the Kingdom of God sheds light on the following passages, covered in their own article here:
1 Corinthians 6:9-10
9 Know ye not that the unrighteous shall not inherit the kingdom of God? Be not deceived: neither fornicators, nor idolaters, nor adulterers, nor effeminate, nor abusers of themselves with mankind,
10 Nor thieves, nor covetous, nor drunkards, nor revilers, nor extortioners, shall inherit the kingdom of God.
Galatians 5:21
21 Envyings, murders, drunkenness, revellings, and such like: of the which I tell you before, as I have also told you in time past, that they which do such things shall not inherit the kingdom of God.
Ephesians 5:5
5 For this ye know, that no whoremonger, nor unclean person, nor covetous man, who is an idolater, hath any inheritance in the kingdom of Christ and of God.
The part of a believer that is capable of sinning will not inherit the kingdom of God. Since the Old Man is the only nature that unsaved people have, they will not inherit the kingdom of God. Only a believer's New Man will inherit the kingdom of God, and they will get a new body at that point in time that is likewise incorruptible and incapable of sinning.
The two natures present within a believer are in a struggle against each other for dominance over the believer's life, and while they remain in an unglorified body, that will always be the case:
Galatians 5:17
17 For the flesh lusteth against the Spirit, and the Spirit against the flesh: and these are contrary the one to the other: so that ye cannot do the things that ye would.
A believer's choices determine who gets the control of their will. That is why the New Testament constantly instructs and reminds believers to walk in the Spiritual Nature, the New Man:
Colossians 3:9-10
9 Lie not one to another, seeing that ye have put off the old man with his deeds;
10 And have put on the new man, which is renewed in knowledge after the image of him that created him:
Ephesians 4:22-24
22 That ye put off concerning the former conversation the old man, which is corrupt according to the deceitful lusts;
23 And be renewed in the spirit of your mind;
24 And that ye put on the new man, which after God is created in righteousness and true holiness.
Romans 13:14
14 But put ye on the Lord Jesus Christ, and make not provision for the flesh, to fulfil the lusts thereof.
Galatians 5:16
16 This I say then, Walk in the Spirit, and ye shall not fulfil the lust of the flesh.
The flesh cannot be reformed. It is corrupt, after the first birth (1 Corinthians 15:22), and has no part in the new birth.
As a result, the only Biblical course of action for a believer is to reckon themselves to be entirely separate from their Old Man, and submit it to God for use in His purposes:
Romans 6:6, 11, 16
6 Knowing this, that our old man is crucified with him, that the body of sin might be destroyed, that henceforth we should not serve sin.
11 Likewise reckon ye also yourselves to be dead indeed unto sin, but alive unto God through Jesus Christ our Lord.
16 Know ye not, that to whom ye yield yourselves servants to obey, his servants ye are to whom ye obey; whether of sin unto death, or of obedience unto righteousness?
Romans 12:1-2
1 I beseech you therefore, brethren, by the mercies of God, that ye present your bodies a living sacrifice, holy, acceptable unto God, which is your reasonable service.
2 And be not conformed to this world: but be ye transformed by the renewing of your mind, that ye may prove what is that good, and acceptable, and perfect, will of God.
Above are more clear testaments to the fact that our flesh is distinct from the true "us" that God sees, which was born again when we believed. It will only ever struggle against New Man, and so it has to be reckoned as dead - not operative on the believer's will.
Walking in the New Man requires diligent effort on behalf of the believer. If it did not, but were instead automatic, the exhortations that have been discussed so far would be entirely unnecessary. We have to deny ourselves (the Old Man) if we are to become disciples (followers) of Christ (Matthew 16:24, Mark 8:34):
Luke 9:23
23 And he said to them all, If any man will come after me, let him deny himself, and take up his cross daily, and follow me.
If this were automatic, such exhortations would be meaningless - yet they abound in the New Testament:
Titus 3:8, 14
8 This is a faithful saying, and these things I will that thou affirm constantly, that they which have believed in God might be careful to maintain good works. These things are good and profitable unto men.
14 And let our's also learn to maintain good works for necessary uses, that they be not unfruitful.
Colossians 2:6
6 As ye have therefore received Christ Jesus the Lord, so walk ye in him:
Colossians 3:2-3, 5
2 Set your affection on things above, not on things on the earth.
3 For ye are dead, and your life is hid with Christ in God.
5 Mortify therefore your members which are upon the earth; fornication, uncleanness, inordinate affection, evil concupiscence, and covetousness, which is idolatry:
Other examples of these exhortations are Philippians 1:27, 2:3, 2:14, 3:1, 3:16, 4:1-2, 4:4-5, 4:8-9, Colossians 3:12-17, 4:6, etc. etc. We could go through each book and probably pick out at least a dozen verses that are exhortations to live righteously, none of which would be required if this was all just an automatic feature of a child of God's life that the Holy Spirit's indwelling alone automatically produced. Walking in the Spirit is a choice made by believers, and it takes effort, work, and sacrifice on our end (Luke 14:33). This has nothing to do with our Salvation, this is discipleship and sanctification.
A large part of the New Testament would be superfluous if this obedience was an automatic result of being saved. The entire world would be evangelized 10 times per year, and every Christian would live a victorious, abundant Christian life. Sadly, that is not reality, at all.
The quintessential passages on this important doctrine are Romans 7:14-8:16, where the Apostle Paul talks about his own inward struggle:
Romans 7:14 - Romans 8:16
14 For we know that the law is spiritual: but I am carnal, sold under sin.
15 For that which I do I allow not: for what I would, that do I not; but what I hate, that do I.
16 If then I do that which I would not, I consent unto the law that it is good.
17 Now then it is no more I that do it, but sin that dwelleth in me.
18 For I know that in me (that is, in my flesh,) dwelleth no good thing: for to will is present with me; but how to perform that which is good I find not.
19 For the good that I would I do not: but the evil which I would not, that I do.
20 Now if I do that I would not, it is no more I that do it, but sin that dwelleth in me.
21 I find then a law, that, when I would do good, evil is present with me.
22 For I delight in the law of God after the inward man:
23 But I see another law in my members, warring against the law of my mind, and bringing me into captivity to the law of sin which is in my members.
24 O wretched man that I am! who shall deliver me from the body of this death?
25 I thank God through Jesus Christ our Lord. So then with the mind I myself serve the law of God; but with the flesh the law of sin.
1 There is therefore now no condemnation to them which are in Christ Jesus, who walk not after the flesh, but after the Spirit.
2 For the law of the Spirit of life in Christ Jesus hath made me free from the law of sin and death.
3 For what the law could not do, in that it was weak through the flesh, God sending his own Son in the likeness of sinful flesh, and for sin, condemned sin in the flesh:
4 That the righteousness of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit.
5 For they that are after the flesh do mind the things of the flesh; but they that are after the Spirit the things of the Spirit.
6 For to be carnally minded is death; but to be spiritually minded is life and peace.
7 Because the carnal mind is enmity against God: for it is not subject to the law of God, neither indeed can be.
8 So then they that are in the flesh cannot please God.
9 But ye are not in the flesh, but in the Spirit, if so be that the Spirit of God dwell in you. Now if any man have not the Spirit of Christ, he is none of his.
10 And if Christ be in you, the body is dead because of sin; but the Spirit is life because of righteousness.
11 But if the Spirit of him that raised up Jesus from the dead dwell in you, he that raised up Christ from the dead shall also quicken your mortal bodies by his Spirit that dwelleth in you.
12 Therefore, brethren, we are debtors, not to the flesh, to live after the flesh.
13 For if ye live after the flesh, ye shall die: but if ye through the Spirit do mortify the deeds of the body, ye shall live.
14 For as many as are led by the Spirit of God, they are the sons of God.
15 For ye have not received the spirit of bondage again to fear; but ye have received the Spirit of adoption, whereby we cry, Abba, Father.
16 The Spirit itself beareth witness with our spirit, that we are the children of God:
Above, we see that the greatest Christian to ever live struggled in his battle against his flesh, and failed repeatedly.
This passage is a powerful treatise on the two natures, and the fact that the flesh is unreformed, and good for nothing. That will never cease to be the case, until it dies, even if one has been born again for 80 years. The only way to win against the flesh is to avoid it entirely.
What happens, though, when a believer walks in the flesh? A large majority of Christians think that they either lose their Salvation, or prove that they never born again at all. This is not true, as the Bible teaches that a Christian can never lose their Salvation.
Instead, when a Christian lives after the Old Man, they get chastened by God:
1 Corinthians 11:30-32
30 For this cause many are weak and sickly among you, and many sleep.
31 For if we would judge ourselves, we should not be judged.
32 But when we are judged, we are chastened of the Lord, that we should not be condemned with the world.
Hebrews 12:6
6 For whom the Lord loveth he chasteneth, and scourgeth every son whom he receiveth.
Above, we see that God chastens every believer, up to and including ending their earthly lives, like He did to some of the Christians at Corinth.
Beyond chastening, and losing blessings in this life (Psalm 1:1-3, etc.), the other motivation given to a Christian to behave is the opportunity to gain or lose rewards at the Judgment Seat of Christ (2 Corinthians 5:10, Romans 14:10), something covered in detail in this article.
Understanding the two natures is so important, because most Christians teach that if someone misbehaves, they will lose their Salvation, or prove that they are not saved at all. This doctrine explains why that is not the case. Such people are simply walking in their old nature. That does not invalidate the new birth.
To reiterate, if every saved child of God walked in the spirit automatically, none of this New Testament teaching would be needed. It is there for a reason, the reason being that it's not automatic - it takes serious effort and dedication to do works in accordance with one's faith. This is entirely separate from the free gift of Salvation (Romans 5:15-18. Romans 11:6), and, as mentioned before, this doctrine deals with the processes referred to as discipleship and sanctification.
Paul himself regarded the entire church at Corinth to be carnal, worldly believers (1 Corinthians 3:1-4), yet never does he question their Salvation. He refers to them as brethren over a dozen times throughout the book.
Believers are told not the grieve the Holy Spirit (Ephesians 4:30) and not to quench the Holy Spirit (1 Thessalonians 5:19). This means that it is possible for a believer to do both.
It is very possible to walk in the flesh for an indefinite amount of time. It is possible for one to completely forget that they are born again (2 Peter 1:9). If a believer makes no effort to walk in the New Man, they will not. The Holy Spirit will never force (encourage, aid, guide, enable - yes, force - no) a believer to walk in the New Man, because if He did, He would do so all the time, and believers would be sinless.
Every Christian, after Salvation, retains the sinful body of their first birth, made after Adam. A believer has to choose every day to put on the New Man, and walk in the spirit. If they do not, they will live identically to how they did before they were saved, as they possess the same dead flesh that they possessed before they were saved. Their brain is still a brain of sinful flesh. This is why looking to one's works for assurance is self-righteous and wrong. One's good works are a result of them submitting themselves to God and choosing to walk in the New Man. It is not automatic, nor is some mysterious level of success required to "prove" one believes in Jesus as Savior.