Part of learning it is.. The word is commonly pronounced /ðiː/ in received pronunciation or /ði/ in general american whenever it is pronounced as a distinct word, e.g.:
We use the definite article in front of a noun when we believe the listener/reader knows exactly what we are referring to:. Have you ever wondered why we say the sun but just coffee?