'Thank you' is a widely used courtesy acknowledgement of a favour ie a helpful act, receipt of a response to a letter, email, etc, or the completion of a transaction when shopping, etc. It can be spoken or written, informal or formal.
'Thank you for your help (with . . )'
'Thank you for your letter in reply to my enquiry (regarding . . )'
On finishing a purchase or receiving a reply to an enquiry 'Thank you'
2) 'Does saying 'Thank you' always mean acknowledgement of a favour, or can it also be used elsewhere ?'