The conventional Protestant answer is to say that you must take this verse in the larger context of the Bible, which includes statements assuring us that our salvation cannot be lost. For example, John 10:28-29, "And I give them eternal life, and they shall never perish; neither shall anyone snatch them out of My hand. My Father, who has given them to Me, is greater than all; and no one is able to snatch them out of My Father’s hand." And many similar verses.
Then look at, for example, Romans 6:6-7, "knowing this, that our old man was crucified with Him, that the body of sin might be done away with, that we should no longer be slaves of sin. For he who has died has been freed from sin."
Most Protestants therefore conclude that when you are saved, you are freed from your "sin nature". While you will still fail and fall, you will not engage in patterns of habitual sin. If you do, you are probably not really saved. That, they say, is what this verse is saying: That if you engage in habitual sin, you are probably not really saved and will not inherit the kingdom.
I'd hasten to add that we are also warned against judging the state of others' salvation. It is not my job to determine whether or not you are saved, that's between you and God.
Note I am speaking specifically from an evangelical Protestant perspective. I think a Catholic would give a very different answer.