Genres
Hard and soft magic
Sanderson's spectrum for magic systems: hard magic has rules the reader knows; soft magic stays unexplained, buying wonder at the price of solving plot problems.
Hard and soft magic are the two ends of the spectrum Brandon Sanderson draws in his First Law essay: "An author's ability to solve conflict with magic is DIRECTLY PROPORTIONAL to how well the reader understands said magic." He sees "a continuum, or a scale, measuring how authors use their magic". At the soft end (Tolkien, A Song of Ice and Fire), magic exists to "establish a sense of wonder and give the setting a fantastical feel", and its rules stay unexplained. At the hard end (Asimov's robot stories, Spider-man), the author lays out the rules so the reader can anticipate solutions; there, "the magic itself is a character".
The distinction matters because it prices your endings. Good soft-magic writers "very, very rarely" solve problems with magic; it is there for visuals and ambiance. Hard magic may solve plot problems openly, because the reader could see the solution coming. Whichever end you choose, the rules you do state become canon the whole book is read against. See Sanderson's laws and Magic A is magic A.