pendeln
to commute
To regularly travel a route between one's home and one's place of work or education.
Sie muss jeden Tag eine Stunde mit dem Zug zur Arbeit pendeln.
She has to commute to work by train for an hour every day.

to commute / swing
Loading your saved state.
to commute
To regularly travel a route between one's home and one's place of work or education.
Sie muss jeden Tag eine Stunde mit dem Zug zur Arbeit pendeln.
She has to commute to work by train for an hour every day.

The verb 'pendeln' (to commute / swing) is closely related to the noun 'das Pendel' (pendulum). The basic idea of a regular back-and-forth movement connects all meanings of the word.
Die Kugel pendelte an einem langen Seil hin und her.
The ball swung back and forth on a long rope.
The context makes the meaning clear: If it is about people and the way to work, 'pendeln' means commuting (m01). If it is about objects, it means swinging (m02). If it is about feelings or values, it means fluctuating (m03).
Viele Studenten pendeln täglich zur Universität.
Many students commute to the university every day.
When talking about commuting to work, the structure 'pendeln zwischen [Ort A] und [Ort B]' (to commute between [place A] and [place B]) is often used. Giving the direction with 'von ... nach' (from ... to) or 'zu' (to) is also common.
Er pendelt jeden Tag zwischen Berlin und Potsdam.
He commutes between Berlin and Potsdam every day.
For the abstract meaning, too, the structure 'pendeln zwischen [Zustand A] und [Zustand B]' (to fluctuate between [state A] and [state B]) is often used. This describes a fluctuation between two abstract poles.
Die Aktienkurse pendelten den ganzen Tag zwischen Gewinnen und Verlusten.
Stock prices fluctuated between gains and losses all day.
to drive / ride
'fahren' and 'pendeln' can both mean moving from one place to another by vehicle. 'fahren' is general: you can go somewhere once, regularly, a short distance, or a long distance. 'pendeln' is more specific and means that someone regularly travels back and forth between home and work or education. Learners might confuse the words because commuting is also a kind of traveling by vehicle. If the regular route to work or school is important, you say 'pendeln'. For a single trip or a journey, 'fahren' is more natural.

Sofia pendelt jeden Morgen mit der Bahn zur Universität.
Sofia commutes to the university by train every morning.
Am Samstag fahren wir mit dem Zug nach Hamburg.
On Saturday we are taking the train to Hamburg.