By which I mean, is it through learning all the graphemes (if that's the right word?) and then just getting a lot of writing practice, that the words finally embed in one's brain. Or does a child usually reach a certain age and then spelling just clicks?
Also, is there a resource anywhere which tells you all the 'rules' for spelling (even, perhaps, the origins of words to explain why some words use a "ur", like in 'curb', say, and other words use an "ir", like in 'bird'?) and also lists the frequently-used exceptions?