1 John 2:26 says, These things have I written unto you concerning them that seduce you. John said he was writing this so that people might not be seduced by putting their faith in worldly things instead of being led by the Holy Spirit. The world always stands ready to seduce people by promising worldly desires, but as followers of Christ, we should never give in to this seduction but should be led by the Holy Spirit.
Verse twenty-seven adds. But the anointing which ye have received of him abideth in you, and ye need not that any man teach you: but as the same anointing teacheth you of all things, and is truth, and is no lie, and even as it hath taught you, ye shall abide in him. John then said we should be taught by the Holy Spirit Who lives in us. He added that the Holy Spirit would teach us everything we needed to know about God. This doesn't mean that we aren't supposed to go to school and learn about things of this world, but that when it comes to things about God, the Holy Spirit will lead us to an understanding. We can only find God by faith in Jesus Christ, and until we put our faith in Him, we cannot be led by the Holy Spirit.
Verse twenty-eight continues. And now, little children, abide in him; that, when he shall appear, we may have confidence, and not be ashamed before him at his coming. John then references little children, calling for them to abide in the Holy Spirit. I believe this applies to all people of all ages. He said if we abide in the Holy Spirit that we can have confidence and not be ashamed when Jesus Christ returns.
Verse twenty-nine concludes. If ye know that he is righteous, ye know that every one that doeth righteousness is born of him. John then tells us if we know that Jesus Christ is the only righteous One, then we know that everyone who lives righteously is born of Him. We will never be righteous by our own merit but can only be made righteous by accepting the righteousness of Christ to redeem us and make us holy in God's sight.