From SRD:
Spellbooks: Wizards must study their spellbooks each day to prepare their spells (see Preparing Wizard Spells, page 154). A wizard cannot prepare any spell not recorded in her spellbook (except for read magic, which all wizards can prepare from memory). A wizard begins play with a spellbook containing all 0-level wizard spells plus three 1st-level spells of the player’s choice. For each point of Intelligence bonus the wizard has (see Table 1–1: Ability Modifiers and Bonus Spells, page 8), the spellbook holds one additional 1st-level spell. Each time the wizard achieves a new level, she gains two new spells of any level or levels that she can cast (according to her new level). For example, when Mialee achieves 5th level, she can add two 3rd-level spells to her spellbook. The wizard can also add spells found in other wizards’ spellbooks (see Adding Spells to a Wizard’s Spellbook, page 155).