Ich werfe kleine Steinchen auf das Fenster, eins nach dem anderen.
Ich werfe kleine Steinchen gegen das Fenster, eins nach dem anderen.
I am throwing small stones at window one after the other.
"Auf" in combination with throwing means either "on top of" or "toward" without implication of hitting.
"Gegen" means against and does imply hitting. "An" is also possible. That would be less aggressive... you'd do that to get your loves attention. "Gegen" would sound out of place right there.