In certain cases, the same items can function both as prepositions and conjunctions, eg: after, as, before, since, until.
the day before she arrived
the day before her arrival
One distinguishing criterion between the two word classes is that prepositions
introduce complements which are nominal or nominalized, whereas the
corresponding conjunctions (subordinators) introduce a subordinate clause.
The situation is however complicated in the case of nonfinite clauses, since
-ing clauses are permitted after a preposition in English:
On arriving she took a taxi.
Compare after, which can be used either as a conjunction or a preposition,
with on the one hand when, which can only be a conjunction, and on the
other by, which can only be a preposition
when = conjunction only
FINITE CLAUSE: when he comes
NONFINITE: when speaking
NOUN PHRASE: *when her speech
after: conjunction or preposition
FINITE CLAUSE: after he comes
NONFINITE: after speaking
NOUN PHRASE: after her speech
by = preposition only
FINITE CLAUSE: *by he comes
NONFINITE: by speaking
NOUN PHRASE: by her speech
FINITE CLAUSE: *come he comes
NONFINITE: come speaking
NOUN PHRASE: come her speech