What are "Sessha" and "Massha"?
Sessha ("摂社") and Massha ("末社") are branch shrines affiliated to the main shrine.
There is no precise definition of the difference between a Sessha and a Massha. However, in general, a Sessha is where a deity that has a strong relation with the deity of the main shrine is enshrined, and a Massha is where other deities are enshrined. In most shrines, divided spirits of deities of famous shrines are enshrined in Masshas.
Under the Modern system of ranked Shinto shrines, set aside in 1946, Sesshas were defined as shrines dedicated for family deities, such as those are wives or children of the enshrined deity of the main shrine, or the aratama of the enshrined deity of the main shrine, or any other special deity such as tutelary deities of the area. And Masshas were defined as shrines dedicated for any other deity.
Sesshas and Masshas are collectively called "Setsumatsusha ("摂末社")", and since most Setsumatsusha are within the precincts of the main shrine, they may also be called "Keidaisha ("境内社")".
Also, Setsumatsusha may also be located outside the precincts of the main shrine. Those located outside the main shrine are called, "Keigai-sessha ("境外摂社")" or "Keigai-massha ("境外末社")", and collectively called "Keigaisha ("境外社")".
Styles of Setsumatsusha
Setsumatsusha may be large or small and are in various styles. The size of the Setsumatsusha often portrays the status or importance of the enshrined deity, and in general, a Sessha is smaller than the main shrine building, a Massha is smaller than a Sessha. Most Setsumatsusha are relatively small, some times small hokoras, and sometimes, multiple Setsumatsusha are located in the same building.
However, some Setsumatsusha has it's own torīs and a chōzuya like a normal small shrine. In some shrines, Setsumatsusha are as large as the main shrine building.