Simply put, the world has magic, though it would be considered "science" by the world itself. This first section is going to provide a background for how the magic works.
"Spells" can be cast via some medium (usually paper) which have the spell written on them. A spell fully describes some kind of interaction via symbols on the paper - the symbols required are exact and can be considered a "language of their own". In other words, you can't write a spell in a different cultural language such as English. "Sorcerers" are people who are capable of writing spells, but normal every-day people are capable of using them. There is no "special ability" that sorcerers have that regular people don't, other than simply the knowledge of the symbols and language used to create spells.
I think it would be clearest if I first give an example of a "fireball" spell - which shoots a flaming ball of fire towards a target. Only one chemical can be provided by a spell, and in the fireball instance this chemical would likely be some form of pitch or oil. The spell must fully describe the chemical makeup of the oil, as well as its interaction with the oxygen in the air which creates the flame. As part of that, its initial velocity relative to the medium the spell is located on also needs to be described.
When the fireball spell is cast, there is no actual oil which appears in the air. But, the effects described in the spell still take place. This means that the oxygen in the air still turns into CO2, and heat in the form of fire is still released - looking like a ball of fire is flying through the air. The spell describes the initial chemical makeup and interaction taking place, but once the "fireball" hits a target, it would continue acting as if the target had been hit with a ball of burning oil, but without the oil actually materially appearing.
If any of the created chemical is still in its initial form when the spell's interaction ends, the spell is "disspelled", and that leftover material no longer acts as though it were there. The medium which the spell is on is typically consumed at this point. There are methods to keep that from happening, defined within the spell itself, but these methods are not commonly known or used.
If a spell is not accurate, that is, if it attempts to replace more chemicals or if the interaction is not described in a way that actually works, any number of things could happen once the spell is cast, depending on the nature and severity of the mistake. "Spell Testing" is incredibly dangerous, especially for sorcerers who aren't all that great at sorcery.
As you can imagine, even just this simple fireball spell would be very difficult to create the first time, but is capable of being copied after that.
tl:dr version: spells are written on paper with specific symbols, but not all symbols are known by every sorcerer, anybody can cast them, an incorrect spell can do anything from fizzle, to kind-of-work, to explode, paper is destroyed afterwards in 99% majority of cases
The society in question is end-of medieval level, but obviously paper and writing tools are more important (and thus, more effort is spent to have them on hand) since spells can be quite valuable to have around. It can also be assumed that they have a great deal more knowledge about how chemicals interact with each other compared to what our own histories suggest. How would sorcerers attempt to prevent people (or even competing sorcerers!) from attempting to "copy" their sold one-use spells?