A dragon knows and casts arcane spells as a sorcerer of the level indicated in its variety description, gaining bonus spells for a high CHA score. Some dragons can also cast from the cleric list or cleric domain lists as arcane spells.
Based on the entry in Dungeons & Dragons Monster Manual 3.5