The scratch is removed by a process called "micro replication" in which microscopic pyrimid shaped particles grind down the glass to the bottom of the scratch . Then a special polishing disc is used in conjunction with water to restore the glass to a new like clarity.
How long does it take to do?
That is largely dependent upon the depth and length of the damage. But by way of example a 8 inch scratch that you can feel with your fingernail might typically take 25 minutes to remove and restore.