You take a high level spell, say 9th, and use it to prepare a number of spells whose levels total 9. Example: 3, 3, 2, 1.
When you prepare the 9th level spell, you pick the spells and the order. After a full round action of casting, the first spell of the sequence is cast. The subsequent spells are cast at the end of each following round until the sequence ends.
When you cast the 9th level spell, you must select targets (if needed) for each spell. So there is a chance that the later spells don't get cast.