I am learning Japanese at a beginner's level. I am wondering how to pronounce the letter ❛ た❜ because according to the chart it should be pronounce as ta , but in listening materials and everyday conversation it is often pronounced as da ,like the word だ . Is it depends on grammar or it's just a custom ? Could you please tell me more details about pronunciation? Thank you for consider my question.
Your native language (Mandarin? Chinese) is confusing you here.
Mandarin distinguishes two kinds of stop sounds - one where the airflow is simply stopped and then allowed to resume again, and one where there's a small burst of noisy air when the closure is released. The first are transcribed in Pinyin with b d g; the second with p t k. English does something rather similar to this, in fact.
In contrast, Japanese has a different distinction between its two kinds of stop sounds. Again, in one, the airflow is just stopped and then allowed to resume, but in the other, your vocal folds are vibrating during the closure (just like in Nicolas Guillemot's answer). In this case, the first series is transcribed as p t k, and the second (voiced) one with b d g.
You can put this sort of in a table like this.
noisy release simple voiced Pinyin t d - Japanese - t d
This is why you're confused about Japanese /t/ - because you're used to Mandarin transcribed using Pinyin, you're used to seeing that sound written as d. In Japanese, d means something else.
You may struggle for a while to hear the difference between Japanese /t/ and /d/ because Mandarin doesn't care at all about that difference, and your ear isn't used to listening for it - it's listening for a different distinction, which in turn Japanese doesn't care about.
Since you say you know what だ sounds like, I'll answer your question indirectly by focusing on the differences between た and だ.
Overall, the difference between た and だ is that だ is "voiced", hence the accent.
So, what does "voiced" really mean?
"Voiced" means that your throat vibrates. To demonstrate this, try putting your fingers on the front of your neck, and say "t" and "d". You'll notice the only difference between the two sounds is that your throat vibrates when you say "d". When you say "t", the air passes without vibrating your throat.
Hopefully this experiment helps you distinguish between the two!
It is pronounced as "ta", like in "target" or "tarmac"