You're thinking of “ta”, tar is how a British English speaker would pronounce it, and it's a shortening of “thanks”. Quite often the speaker will tag “very much” to the end.
‘‘Ta,’ said Willie gratefully’
As to why and how “ta” means “thank you”, that is an interesting question.
As WS2's answer explains, the etymology of ta has been dated from 18th century, but it was probably said and heard much earlier than that. The OED believes that the sound is imitative of small children speech, and there is some evidence to suggest that is true. Searching online, I found several resources which state that children master the unvoiced "th" sound by the time they are seven or eight years old.
Speech Developmental Milestones:
- /p,b,m,h,w/ and vowels are expected to be mastered by 2.5 to 3 years of age.
- /d,t,k,g,f,n,ng,y/ are expected to be mastered by 4 years of age.
- /s,z,l,v,sh/ are expected to be mastered by 6 years of age.
- /j,ch,th/ are expected to be mastered by 7 years of age.
- /r,zh/ are expected to be mastered by 8 years of age.
Source: Tips For Teaching the “th” Sound
A child should be able to say ALL sounds correctly including:
r s z th (thin) TH (that)
Speech Development in Children. When Does It Start? (link)
In a paper titled, The Sequence of Speech-Sound Acquisition, its author Fran R. Lehr, M.A., reproduces a table listing the different sound acquisitions mastered by children between the ages of one and eight years old.
Very young children will sometimes pronounce thank you as “tank you”
Ds1 [Dear son #1] is 3.5 and cannot say the 'th' sound. I know this is well within what is considered normal speech development. ….
… My ds has a different sound for the 'th' depending on what word he is saying.
Three = 'free'
Thing = 'hing'
Something = 'someping'
This = 'dis'
Thank you = 'tank you'