What is the difference between preparing and casting a realm spell?
Preparing a spell can take place far in advance of the casting, just as for regular spells. This generally takes a magic action (1 month). Actually casting a realm spell takes anywhere from a battle round to a day (1 hour is standard). Casting is a free action. You can prepare a single realm spell for each spell level you can cast, plus an additional number of 0-level realm spells equal to the number of other realm spells you can cast.