This is the famous story of the woman caught in adultery.
Of enduring interest in the interpretation of this passage is what Jesus wrote on the ground in John 8:6 and 8:8. The verses only tell us that he wrote; they don't indicate what was written.
So then what was written? Ultimately we can only speculate. There are two popular suggestions (at least these are the most common I have heard). The first is that Jesus wasn't writing anything in particular. He was doodling, an indication of his disinterest, even boredom, in the Pharisees' zeal to condemn the woman. The second is that Jesus was writing down the sins of the individual Pharisees present. With his challenge in John 8:7 ("He that is without sin among you, let him cast a stone at her"), and on seeing their sins manifest in the writing, they departed.
It occurs to me that there is another interpretation. I haven't read this interpretation anywhere, but I don't claim originality for it, as I'm sure some saint somewhere has already thought of it.
The Pharisees mention the Mosaic Law in John 8:5: "Now Moses in the law commanded us to stone such a one. But what sayest thou?" The Pharisees are referring to the written law of the Old Testament. It is immediately after this in John 8:6 that Jesus begins writing on the ground. We are not told what he is writing. The fact that we are not told what is written is a clue that what is important is the act of writing and not the physical product of the writing. In the act of writing, Jesus is indicating that He is writing the New Law that transcends the Old Law quoted by the Pharisees.
This New Law is not written in the manner of the Old Law. It is written in the Life and Acts of Jesus Christ Himself. This is why we are not told what Jesus wrote on the ground; it doesn't matter. What matters is what Jesus does, for that is the content of the New Law. The New Law consists in conforming ourselves to the Person of Jesus Christ.
Jesus challenges the Pharisees in John 8:7 (and implicitly the Old Law) and in John 8:8 continues to write on the ground. This is an indication that His Act, His writing of the New Law, continues uninterrupted. In John 8:9, the Pharisees depart, leaving Jesus alone with the woman. John 8:10 then tells us that Jesus lifts Himself up. He is done writing as His Act in writing the New Law is finished and he has demonstrated the superiority of the New over the Old by the departure of the Pharisees. He then applies the New Law to the woman in John 8:11 in an act of mercy.
What we have here is a revolutionary approach to the Law. The Law is not a list of commands and proscriptions; at least, it is not primarily that. The Law is a Person; it is in uniting and conforming ourselves to that Person that we truly fulfill the Law. It is because we didn't know that Person that we needed the list of commands; in knowing Him, the list becomes unnecessary. If we conform ourselves to Jesus Christ, we will follow the Law more faithfully than any zealous adherence to a list of commandments could achieve.