Spelling, or orthography (ortografía in Spanish) is a set of rules for forming words from individual letters.
In English, spelling is not phonetical, meaning words are not always written or spelled as they sound.
Spanish, for the most part, is a phonetical language. Most words are written as they sound. This greatly simplifies learning Spanish spelling rules.
- More on Spanish spelling rules needed here.
Spelling rules were much more lenient before the advent of books and printing, and after books and writing became the norm, language started to solidify in terms of spelling.