I am confused on when to pronounce the pronouns that starts with th as the correct way, for example the word 'the', when I am watching a movie, I always hear they pronounce the th as 'd'. But for some pronouns like those, these, etc. they pronounce it in the proper way.
The proper way to pronounce the, them, they, their, that, then, etc, etc is with a soft "th" sound.
Pronouncing the "th" sound as "d" is called th-stopping and it is a feature of certain accents, notably New York City English and African-American Vernacular English. It is also stereotypically associated with lower-educated people and with Italian-American mobsters.
As an English-language learner you should attempt to pronounce the soft "th" sound, as deliberately th-stopping might be construed as a mockery or insult. But if you cannot pronounce it properly you will still be understood.
There are a lot of native speakers, with a lot of accents.
In the "big two" (General American, and Received Pronunciation) "The" has a /ð/ phoneme. But as "the" is generally unstressed, there will be a lot of subtle variation on the actual production of this sound when placed in a sentence with other vowels and consonants around it.
In other dialects "the" can be pronounced with a /də/ (some African American, some New England dialects have this) or /t/ (typically Yorkshire). You'll sometimes see this rendered in text ("Da funk", or "tha'll goa raight to t' devil" (thou will go right(=straight) to the devil).)
Mispronouncing /ð/ as /d/ is also a common feature of many non-native accents, as /ð/ is a rather rare sound. If you deliberately use /d/ you will simply sound "foreign".
What you hear, and what a native speaker will hear may not be the same! However in GA and RP the sound is phonemically /ð/ for a speaker of that dialect, and not /d/.
“th” has two phonemes: /ð/, which is voiced and usually occurs at the beginning of syllables, and /θ/, which is voiceless and usually occurs at the end of syllables.
A few accents do reduce /ð/ to [d] or [t], but if you “always” hear this, then it is more likely you cannot distinguish the normal /ð/ sound.