It depends. Some vehicles have harder glass than others. I have had luck polishing scratches out of side windows, but the windshield is harder. You certainly need a buffer. A rotary buffer would be best.
I used heavy cut polish and chrome polish. Chrome polish is great on glass, even if it doesn't have scratches.
You can give it a try. Start the drill out slow so that the polish doesn't sling all over, then speed up the drill to High and really work it in for several minutes. Keep repeating until the scratches are gone.