Festivals falls into two main categories: matsuri and nenchuû gyôji.
Matsuri (祭り) : festivals
Matsuri are native Japanese festivals of sacred Shinto origin. They are linked to the cultivation of rice, or a local community's physical and spiritual well-being. Originally, they are shinto rites aiming to pacify Gods and Ancestors and to help the agricultural cycle. Thus, matsuri are synchronized with seasonal change. Matsuri symbolize the community's unity with itself and with its Shinto gods (kami). However nowadays festive elements and commercial interests tend to make forget about initial purpose of some matsuri.
Nenchû gyôji (年中行事) : annual events
Nenchû gyôji are annual and seasonal events which have a chinese or buddhist origin. "Nenchû gyôji" term was first used durig Heian period (794-1185) in reference to the imperial court calendar. Many chinese festivals were integrated in popular tradition during Heian period, and are still celebrated nowadays including the five seasonal festivals (sekku). Events celebrating warrior heroism appeared especially during Edo period (1600-1868). For example, the Shichigosan (seven-five-three) based on the court costumes used during rites of passages celebrated for 3 to 5-year-old boys and 3 to 7 years-old girls.