We lined up to buy concert tickets.

Literal

We [topic-は] concert [attributive-の] ticket [object-を] buy [for-purpose-のに] line [object-を] make-[sequential-て] lined-up.

~のに (with a dictionary-form verb) means 'in order to, for the purpose of' — distinct from the contrastive のに ('although, despite'). 列をつくる ('form a line') + 並ぶ ('line up, stand in a row'). The ~て form links 'making a line' with 'being lined up.' コンサート is an English loanword.