They're different forms of the word depending on number and case. The former should be obvious, the latter is (as always) determined by the grammatical context in a sentence.
Jahr, Monat, Tag: nominative, dative and accusative singular
Jahre, Monate, Tage: nominative, genitive and accusative plural
Jahren, Monaten, Tagen: dative plural