The term "spell" refers to a magical formula, whether written or mental, that enables a spellcaster to alter reality in accordance with the parameters of that formula. In its written form, a spell is expressed by a complex, non-representational cipher that is completely unintelligible to anyone whose mind has not been prepared to do so. Such preparation is a significant part of a spellcaster's apprenticeship, with years spent in exercises intended to open the mind to the non-physical "impressions" of spells. These impressions are the mental form of a spell and translating them between their written and mental forms is another important part of a spellcatser's apprenticeship.
Though commonly spoken of as existing in the "memory" of the spellcaster before they are activated, this isn't quite accurate. Rather, a spell exists in the mind as an "image" or "symbol" that corresponds to a known effect in the real world. Becoming a spellcaster is, in part, learning the ability to associate these symbols with specific effects and do so in such a way as to bring them about outside the mind. This process is difficult and mentally taxing and, initially, most spellcasters are unable to retain a small number of minor symbols in their minds at once. It is only with time and experience that they expand their minds sufficiently to be able to retain more -- and more potent -- symbols.
The discovery of the correspondences between these mental symbols and non-mental effects occurred in the distant past, likely in the time of the mysterious Ancients. So obscure are these correspondences that, even after untold millennia of research, the number of spells has not expanded much beyond the 100 or so spells that are taught in magical academies today. This has led some to suggest that all possible correspondences have already been discovered, an opinion some sages scoff at, for both history and legend speak of spells whose effects are unlike any seen in the present era.