They take definite article when they refer to a specific object or idea.
Countable nouns are not mass nouns. So, I'm unclear about what you mean in the second half of your question.
Same noun can be countable or uncountable depending on its meaning.
I want to have chicken. = I would like to eat some meat that comes from birds referred to as chickens (chicken is uncountable).
I want to have a chicken. = I would like to have a bird that is referred to as chicken (to keep as a pet?) (chicken is countable).
Student or Learner