anhängen
to hang on
To fasten something to another thing so that it hangs from it.
Kannst du den Schlüssel bitte wieder an das Schlüsselbrett anhängen?
Can you please hang the key back on the key board?

to attach / pin on
Loading your saved state.
to hang on
To fasten something to another thing so that it hangs from it.
Kannst du den Schlüssel bitte wieder an das Schlüsselbrett anhängen?
Can you please hang the key back on the key board?

'Anhängen' is a separable verb. In a main clause, the prefix 'an-' comes at the end of the sentence. In subordinate clauses and infinitive constructions with 'zu', the verb stays together.
Er hängt den neuen Kalender an die Wand an.
He hangs the new calendar on the wall.
The verb combines 'an' (on/to) and 'hängen' (to hang). The literal meaning is to hang something up physically. In figurative meanings, you can 'anhängen' blame to someone or 'anhängen' yourself to a group.
Sie hängte die Wäsche auf die Leine an.
She hung the laundry on the line.
In the meaning 'hinzufügen' (to add), the verb is very commonly used today for digital files. Typical phrases are 'eine Datei anhängen' (to attach a file), 'ein Dokument anhängen' (to attach a document), or 'ein Foto an eine E-Mail anhängen' (to attach a photo to an email).
Ich habe die Präsentation als Anhang an diese Nachricht angehängt.
I attached the presentation to this message as an attachment.
To express that someone is being falsely blamed, you use the structure: 'jemandem (Dativ) etwas (Akkusativ) anhängen' (to pin something on someone). The person being accused is in the dative.
Die Polizei konnte ihm den Diebstahl nicht anhängen.
The police couldn't pin the theft on him.
When joining a group, the verb is used reflexively: 'sich anhängen' (to tag along). To say whom you are joining, use the preposition 'an' with the accusative.
Auf dem Weg zur Party haben sich noch zwei Freunde an uns angehängt.
On the way to the party, two more friends tagged along with us.
to follow
'folgen' and 'sich anhängen' can both mean that you go along with someone. 'folgen' is more neutral: you move behind a person or thing, for example because you do not know the way. 'sich anhängen' means that you join a person or group and go along with them. It often implies that you were not necessarily invited or that you simply join in. The words can be confused because in both cases someone is not going alone. However, 'folgen' emphasizes movement behind someone or something, while 'sich anhängen' emphasizes joining a group.

Nach dem Unterricht hängt sich Tom an die Gruppe an und geht mit zum Park.
After class, Tom tags along with the group and goes to the park with them.
Wenn du den Sportplatz nicht findest, folge einfach den anderen Schülern.
If you can't find the sports field, just follow the other students.