In English, it's often hard to tell whether phrases, such as as well as or other than, are working as prepositions or conjunctions, or just as combinations of individual words. This slipperiness also occurs with rather than, which is found in grammatically balanced compound sentences as well as sentences with subordinate clauses. (If any of this is confusing, read on. We'll lay it all out.) Basically, the role of rather than depends on the type of sentence in which it's being used.
The word rather, itself, is commonly used in English as an adverb to indicate preference, degree, or accuracy.
I would rather not go.
It's getting rather late.
She sings rather well.
He's got a rather nice voice.
She is a doctor, or rather, a surgeon.
It took some time, but eventually grammarians and lexicographers got the message and recognized that rather than had meaning as a distinct grammatical unit. The key to telling whether rather than is a conjunction or preposition is to look at the words that precede and follow it.
As a conjunction, parallel grammatical constructions appear on each side of rather than. When used to coordinate verbs, it indicates that something is done in place of something else—and the verbs are inflected in the same way. Typically, the base forms of the verbs are used (often with to omitted before the verb following rather than).
For exercise, I walk rather than run.
He decided to call rather than text.
Rather than repair the car, I prefer to buy a new one.
Additionally, conjunctive rather than joins nouns, adjectives, adverbs, and prepositions that have parallel forms. In such instances, rather than indicates choice or negation.
I drink coffee rather than tea.
He bought red rather than green peppers.
She eats slowly rather than quickly.
Can we come over on Saturday rather than (on) Sunday?
As a preposition, rather than is synonymous with instead of and begins subordinate clauses (clauses that can't stand alone as a sentence) that have a present participle (the -ing form) of a verb serving as a noun (in other words, a gerund). When rather than functions as a preposition, the verbs in the sentence are not parallel.
Rather than driving, he rode his bike to work.
Rather than using dried herbs, he picked fresh ones from the garden.
She took the blame rather than blaming everyone else.
In sum: when rather than has parallel elements before and after it, like walk/run from the above example, it's wearing its conjunction hat. You'll know its preposition hat is nearby when you see dissimilarity between verb forms—as in driving/rode—and rather than followed by an -ing verb to form a prepositional phrase. Now, as always, hats off to grammar!