A chaitya is a Buddhist shrine or prayer hall with a stupa at one end. In modern texts on Indian architecture, the term chaitya-griha is often used to denote an assembly or prayer hall that houses a stupa.
Vihara generally refers to a monastery for Buddhist renunciates. The concept is ancient and in early Sanskrit and Pali texts, it meant any arrangement of space or facilities for pleasure and entertainment.
The term evolved into an architectural concept wherein it refers to living quarters for monks with an open shared space or courtyard, particularly in Buddhism. The term is also found in Ajivika, Hindu, and Jain monastic literature, usually referring to the temporary refuge for wandering monks or nuns during the annual Indian monsoons.
In modern Jainism, the monks continue to wander from town to town except during the rainy season (Chaturmas), the term "vihara" refers to their wanderings. Vihara or vihara hall has a more specific meaning in the architecture of India, especially ancient Indian rock-cut architecture. Here it means a central hall, with small cells connected to it, sometimes with beds carved from stone.