To say God is omniscient is to acknowledge that He possesses exhaustive, perfect, and instantaneous knowledge of all things—past, present, and future—both actual and possible. Because He is the Creator and Sustainer of all existence, He knows all things in Himself, independently of any external conditions or events.
In the Reformed tradition, we confess that God is, in and of Himself, infinite in perfection and knowledge. As stated in the Westminster Larger Catechism Q7, God is one who is 'knowing all things.' This does not mean He learns over time; rather, His knowledge is an attribute of His eternal, unchangeable nature. He does not base His plans on what He sees us doing, but rather He knows all things because He has decreed them. The 1689 LBCF Ch.3 §2 clarifies this beautifully, stating: 'Although God knoweth whatsoever may or can come to pass, upon all supposed conditions, yet hath he not decreed anything, because he foresaw it as future, or as that which would come to pass upon such conditions.' This protects the glory of God from being contingent upon human action.
It is both a terrifying and a wonderfully comforting reality that God knows us fully. We are indeed more sinful and flawed than we dared believe—He sees every hidden thought—yet because of the finished work of Jesus Christ, we are more accepted and loved than we ever dared hope. Because He knows all, He knew exactly what it would cost to redeem you, and He chose to send His Son anyway. The Psalmist captures this intimacy: 'O Jehovah, thou hast searched me, and known me. Thou knowest my downsitting and mine uprising; Thou understandest my thought afar off. Thou searchest out my path and my lying down, and art acquainted with all my ways. For there is not a word in my tongue, but, lo, O Jehovah, thou knowest it altogether' (Psalm 139:1-4). We rest not in our ability to hide our flaws, but in His perfect knowledge of them, covered by the blood of Christ.