De is used for masculine and feminine words, while het is used for neutral (?) words.
Which gender belongs to which word is something you'll have to learn
That is in other languages. In dutch it is random unless it is plural and it is always de. Also 70% of the time it is a de word.