Than is generally used to compare things, while then communicates time. Since they are spelled and pronounced almost identically, many people don't realize the two words have different meanings and are one of many homophones people confuse all the time.