Masculine nouns with -n: n-declension
Weak masculine nouns add -(e)n in accusative, dative and genitive singular: der Student → den/dem/des Studenten. This also applies to many nouns such as Kollege, Kunde, Junge and Mensch.
Understand the idea
A group of masculine nouns takes -n or -en in accusative, dative and genitive singular. These are often called weak nouns or n-declension nouns. Their ending is separate from the case marking on the article.
Build it step by step
Learn the nominative and an object form together, such as der Student and den Studenten. The same noun ending appears after dem and in many genitive forms. A following verb or preposition may trigger the case. The plural frequently has the same visible -n/-en form, so the surrounding sentence still matters.
See it in a sentence
Ich frage den Studenten.
Wir besuchen den Kollegen.
A useful memory aid
Mark weak nouns in your vocabulary notes instead of trying to infer the pattern from every noun ending. Common words such as Mensch, Student and Kollege deserve early attention.
A common trap
Do not leave the noun unchanged after an accusative or dative article. Also do not add the ordinary strong genitive -s on top of a weak-noun ending.