She got the ticket for free.

Literal

She [topic-は] [for free-ただで] that ticket [object-を] obtained.

ただ has a useful family of meanings: as an adverb 'just/merely,' as a な-adjective 'free of charge' (ただ+で 'for free'), and as a noun 'free' (ただほど高いものはない 'nothing is more expensive than something free' — a famous proverb). Here ただで is the 'for free' sense — で marks the manner/means of getting it. 手に入れる ('obtain, acquire,' literally 'put into hand') is the standard verb for actively coming into possession of something — distinct from もらう ('receive') or 買う ('buy'). チケット rather than 切符 here uses the kanji 切符, which historically named tickets for transportation but has broadened over time; 切符 still feels slightly more formal or old-school than カタカナチケット.