How do CpG islands remain unmethylated?
Methylation is increasingly seen as a consequence of gene activity rather than a regulatory mechanism. There are cases where methylation is controlled because of gene regulatory control, especially at the famous H19/Igf2 locus[1]. Here is a generally good recent review[2], note they mention that DNA methylation does not cause transcriptional silencing, and likely methylated promoters are probably more active than unmethylated, they just create silencing RNAs when methylated (resulting in an apparent silencing).  This may help explain some of the story[3], but note how old that paper is, yet generally I'd say few people know of its existance.

The exception seems to be transposable elements[4], but their control is probably also controlled by silencing RNAs.

References:


 Zampieri M, Guastafierro T, Calabrese R, Ciccarone F, Bacalini MG, Reale A, Perilli M, Passananti C, Caiafa P. 2012. ADP-ribose polymers localized on Ctcf-Parp1-Dnmt1 complex prevent methylation of Ctcf target sites. The Biochemical journal 441: 645–52.
 Deaton AM, Bird A. 2011. CpG islands and the regulation of transcription. Genes &amp; development 25: 1010–22.
 Rountree MR, Selker EU. 1997. DNA methylation inhibits elongation but not initiation of transcription in Neurospora crassa. Genes &amp; Development 11: 2383–2395.
 Bourc’his D, Bestor TH. 2004. Meiotic catastrophe and retrotransposon reactivation in male germ cells lacking Dnmt3L. Nature 431: 96–9.