The basic difference between the two words is the following: than is used when we are talking about comparisons, and then is used when we are talking about something relating to time.
Than is always used to introduce a comparison, often with words like: bigger than, fewer than, more than, less than etc.
Than is usually a conjunction and it is one of the most used words in the English language being a part of many idioms (more fun than a barrel of monkeys, more dead than alive, easier said than done, better late than never etc.).
Some examples of than in everyday use, outside of idioms, would be:
I am older than my sister.
Apples are healthier than hamburgers.
Then is the word to choose when time is involved, and it usually has a relationship with time, typically acting as an adverb, modifying other adverbs as well as adjectives and verbs.
Then is defined in the dictionary in various ways including “at that time, at the same time, in that case, soon afterward, in addition, next in order (in either place or time), or as a consequence.”
Some examples would be:
Go into the building, then turn left.
They talked and talked, then, finally, they came to a conclusion.