Here is a link to to an online commentary on Psalm 51 which will assist in answering your question:
Here is a paraphrase of verses 9 and 10 which might be of assistance. This is taken from an online Bible Commentary [the Believer's Bible Commentary]:
Passage: Psalm 51:9 Hide Your face from my sins, And blot out all my iniquities.
Paraphrase: 51:9 Oh, my God, I beg You to turn away Your face from looking on my sins in judgment and punishment. Blot out the last vestige of my enormous iniquities. How they stab me every time I think of them!
Passage: 51:10 Create in me a clean heart, O God, And renew a steadfast spirit within me.
Paraphrase: 51:10 Looking back, I realize that the trouble all started in my mind. My thought-life was polluted. I entertained evil thoughts until at last I committed the sins. So now I ask that You create in me a clean mind. I know that if the fountain is clean, the stream flowing from it will be clean as well. Yes, Lord, renew my entire inner self so it will be steadfast in guarding against future outbreaks of sin.
I hope you have found this helpful.