(If not even Webster can supply a definition, I will.)

Spelling (orthography) is the way a spoken language is written.

It usually involves an alphabet of basic symbols. These may correspond to individual sounds (or rather, phonemes), or to larger clusters such as syllables or whole words. The latter, which is used today for Chinese and Japanese, requires many more symbols, and therefore is much harder to learn, but faster to read.

Most languages have a sound-based spelling, but they are rarely purely phonetic: many other factors interfere with the principle of spelling words 'the way they sound'. These include

the pronunciation of words changes over time; the orthography of English, for example, is a fairly close rendering of how the language sounded when Geoffrey Chaucer wrote his works, but since pronunciation was never standard in those days and evolved since then, there are now many different ways to spell the same sound (e.g. cow vs. Slough) and even more different ways of pronouncing the same string of letters (cow vs. slow; cough vs. Slough vs. rough vs. though vs. through vs. thorough)
foreign loans
foreign loan words are often taken in the spelling of the original language; if many foreign words are loaned, whole new letters may be taken from the language (eg. the difference between k, c and q doesn't make phonetic sense in Germanic languages)
a foreign spelling system
more spectacular is the case where a whole spelling system is applied to a new language; for instance, the Latin alphabet has been applied to spell Germanic and Slavic languages, but the alphabet doesn't nearly contain enough vowels and consonants, so all kinds of hacks have been devised around that
to speakers it often makes much sense to make the spelling reflect the 'logical' (morphological) structure of words, even when it doesn't match the 'actual' (phonetic) realisation; English doesn't do this much, but every Dutch speller has to learn how to cope with ds and ts in verb forms:
  • Jan, word wakker! (Jan, wake up!) vs. Jan wordt wakker. (Jan wakes up.)
  • Geloofd zij God. (God be praised.) vs. Gelooft zij God? (Does she believe God?)

Some languages like to change their spelling every 30 years; Dutch is an example. The result: endless debates on spelling reform. Good fun.