Why does ammonia "clean" scratches? I read that ammonia can be used to clean scratches of certain materials, for example from wedding rings. I was thinking about how this would work but I actually don't know. I suspect that the question I might have to ask is "what is a scratch" and that thus the reason for my misunderstanding comes from some ambiguity in what a scratch might be in the English language. 

This is how I would phrase my understanding of a scratch: A scratch on a material is a place on which parts of the surface are removed, creating a "cut" in the surface. Thus there are less particles in one place than the surrounding. 

Either way, that is pretty much how I imagine it. If this is the case, why does ammonia "remove" the scratch? Does the ammonia-water solution fill the crevice left and attach itself to the surrounding material, for example the gold. If the ammonia-water solution is transparent you would just see the gold underlying the scratch and it would seem to have "filled" the scratch. But for that to happen the ammonia would have to become solid, which does not happen at room temperatures.

Perhaps the reason why a deep cut can not be "cleaned" with the solution, whilst the small cuts can, is that the word "scratch" is used for two different physical phenomena. 

I'm hoping to get a deeper understanding of what is actually happening to the material being cleaned by the water-ammonia solution. Or, perhaps, a link to a paper or other resource explaining what happens. 

Links:


https://www.leaf.tv/articles/how-to-get-scratches-out-of-a-gold-ring/
http://www.wikihow.com/Remove-Scratches-from-Glass
This seems more like folklore than a tested method. However, gold is extremely soft (malleable), and it must be alloyed with other metals to make it hard enough to survive wear as jewelry. Simply rubbing a gold item with a cloth, with or without "ammonia" (ammonium hydroxide, $\ce{NH4OH}$), is enough to polish the gold, i.e. relocate some gold particles to fill in the scratch.

Household ammonia does not solidify, nor will it fill scratches. In fact, it simply evaporates into the air. It is an effective cleaner, though, and would help remove anything adhered to the gold, which might appear like a scratch.

For the same reason, ammonium hydroxide is an effective glass cleaner, but don't expect it to remove any scratches. The suggestion at your second reference to use toothpaste, though, is a good idea, particularly for those brands containing silica.

BTW, "milk of magnesia", $\ce{Mg(OH)2}$, is an effective mildly abrasive scratch remover for some plastics, if rubbed very well with a soft cloth.