1 John 1:8 is referring to the fact that we were conceived in sin and brought forth in iniquity, therefore sin dwells within us.
Verse 9 says that if we confess our sins, He is faithful and righteous to forgive us our sins and to cleanse us from all unrighteousness.
Verse 10 says that if we say that we have not sinned [that is, we have never sinned], we make Him a liar, and His word is not in us.
The very next verse [chapter 2:1] it says, My little children, I am writing these things to you that you may not sin.
Verse 28-29 say, And now, little children, abide in Him, so that when He appears, we may have confidence and not shrink away from Him in shame at His coming. If you know that He is righteous, you know that everyone also who practices righteousness is born of Him.
5 And you know that He appeared in order to take away sins; and in Him there is no sin.
6 No one who abides in Him sins; no one who sins has seen Him or knows Him.
7 Little children, let no one deceive you; the one who practices righteousness is righteous, just as He is righteous;
8 the one who practices sin is of the devil; for the devil has sinned from the beginning. The Son of God appeared for this purpose, that He might destroy the works of the devil.
9 No one who is born of God practices sin, because His seed abides in him; and he cannot sin, because he is born of God.
10 By this the children of God and the children of the devil are obvious: anyone who does not practice righteousness is not of God, nor the one who does not love his brother.
Jon David Banks, God’s most unworthy servant
Scripture quotations taken from the (NASB®) New American Standard Bible®, Copyright © 1960, 1971, 1977, 1995 by The Lockman Foundation. Used by permission. All rights reserved. www.lockman.org