It's in the core rulebook under magic. Go to the section on clerics and
Spell Selection and Preparation: A divine spellcaster selects and prepares spells ahead of time through prayer and meditation at a particular time of day. The time required to prepare spells is the same as it is for a wizard (1 hour), as is the requirement for a relatively peaceful environment. When preparing spells for the day, a cleric can leave some of her spell slots open. Later during that day, she can repeat the preparation process as often as she likes. During these extra sessions of preparation, she can fill these unused spell slots. She cannot, however, abandon a previously prepared spell to replace it with another one or fill a slot that is empty because she has cast a spell in the meantime. Like the first session of the day, this preparation takes at least 15 minutes, and it takes longer if she prepares more than one-quarter of his spells.