A BAD programmer...
...writes loads of code that usually doesn't work. When they do get it to work they have no idea why it does so [programming by coincidence].
An AVERAGE programmer...
...writes loads of code that works. They are happy that it is working and they broadly understand why it does.
A GOOD programmer...
...implements the same working functionality as the average programmer, but they use far less (and more simple) code to do so. As their code is smaller and simpler, they fully understand why it works.
An OUTSTANDING programmer...
...writes the same code as the good programmer but then refactors until most of it gone. What remains is clean an elegant. Their code is so good that even the bad programmer can understand it.