At least according to Merriam-Webster, when can function in four different ways—and none of them is as a preposition.
Also, it doesn't require verbs following it to take an -ing form. The following version of the example sentence would also be fine:
When you study, don't talk to her.
From Merriam-Webster:
adverb
1 :at what time
// when will you return
conjunction
1 a :at or during the time that: WHILE
// went fishing when he was a boy
1 b : just at the moment that
// stop writing when the bell rings
1 c : at any or every time that
// when he listens to music, he falls asleep
pronoun
: what or which time
// life-long homes for those … who have lived here since when
— Kim Waller
noun
: the time in which something is done or comes
// about troubled his head very little about the hows and whens of life
— Laurence Sterne
In the case of the example sentence, it's being used as a conjunction. Although the first example sentence of Merriam-Webster's definition of its adverbial sense starts with when, it's not being used to join two clauses together.