Those who believe in original sin believe that David is saying that he was born a sinful person. However, that is a misinterpretation.

The truth is a bit simpler. He means that he was born into a sinful world, and even his mother, whom he probably loved more than anyone else other than God, was a sinner. Put in other words, his mother was a sinner when he was conceived, and when he was born, the world was full of sin. Sin and sinful people had surrounded him his whole life. A baby is born a fairly blank slate, certainly having done no sin, but the influence of sinners along with his fleshly nature invariably get the better of him, and before long, he sins. In his way, David is telling God, “With all the sin around me, it's not surprising that I sinned too.”

In the next verse, he declares that God “desires truth in the inward parts” (Psalm 51:6). In other words, He wants people to change their natures, which only He can help us to do, as the last half of the verse explains: “And in the hidden part You will make me to know wisdom.”

David is essentially repeating what God said in Genesis 8:21, ". . . man's heart is evil from his youth." But he wanted his nature changed from evil to good, from dirty to clean, from lies to truth. Only repentance and a renewed relationship with God would enable that to occur. And, truth be told, it will never be completely changed until the resurrection from the dead.