Her friends gave her that name.

Literal

Friends [topic-は] her [target-に] that name [object-を] attached.

つける literally means 'to attach' — 名前をつける is how Japanese expresses 'to give a name.' The に marks the recipient. 友人達 uses the pluralizing suffix 達 (たち), explicitly marking plurality, which Japanese usually leaves implicit.