In this verse Paul tells us that the "solid foundation of God", or in other words, a truth that is bedrock, immovable and unchanging, is this fact; God has placed a "seal" upon those He knows. This seal can be seen in the way that "everyone who names the name of Christ departs from iniquity."
This word "seal" in the Greek means "a mark of genuineness" as well as "protection from misappropriation." Meaning that the "seal" God places upon his children (which is the fact that they will depart from iniquity), not only acts as "a mark of genuineness", but it also acts as "protection from misappropriation" (i.e. not genuine)
Therefore, Scripture is testifying that the mark of genuine faith, a faith that causes God to recognize us as His own, will be displayed in the fact that we will "depart from iniquity." This verse is not speaking about perfection, but direction. Meaning, Paul is not saying we must be perfect in order to be God's (that would go against his own teaching throughout the N.T. cf. Eph. 2:8-9), but the direction that a "genuine" believer travels after repenting of their sins and placing their trust in Christ alone for Salvation, is away from sin. Or in other words, they depart from their iniquity. If there has never been any change in a person's direction in life, then God's word is quite clear that there "profession" of faith must be repented of.
On the other hand, this "protection from misappropriation" also acts as a protective seal from God against false converts from errantly "misappropriating" a false confession (i.e. confession of faith in Christ without repentance from sin towards God), or of receiving any false assurance of salvation, without having a change in their direction of living for God instead of their fleshly desires (cf. 1 John 2:28-29).
In the previous 18 verses of this chapter Paul gives Timothy an example of what a person who has the "seal" of God actually looks like. Paul tells him that those who have God's seal are known as "faithful men" in their walk with God (v.2), "good soldiers" who are taking part in the Heavenly Battle (v.3), athletes who compete "according to the rules" of God's Word (v.5), "hardworking farmers" who do the work of the Lord in the harvest (v.6), "the elect" of God who have obtained salvation and are enduring in the faith (v.10), and the "approved" of God who diligently study God's word so that they can accurately understand the word of God (v.15).
Again, Paul is not speaking about perfection, but direction. Because in the remaining seven verses following v.19, Paul reminds Timothy to "flee youthful lusts" and to "pursue righteousness, faith, love, and peace" (v.22), knowing that the Christian life is one of fleeing and pursuing. We are to flee (or depart from) sin, and to "pursue righteousness, faith, love, and peace".
As you go forward this week remember that God is not concerned in our perfection, but only our direction. Having the "seal" of God upon our lives will be identified through a life that is set apart for Him, or in other words God has called us to be "a vessel for honor, sanctified and useful for the Master, prepared for every good work" (2 Timothy 2:21). Let's choose to flee from the lusts of this world (by departing from iniquity), and let's wholeheartedly "pursue righteousness, faith, love, and peace", so that when the world looks at us, there will be absolutely no mistake about Whose seal is upon our lives.