The Palomar Transient Factory (PTF) is a wide-field experiment designed to investigate the optical transient and variable sky on time scales from minutes to years. PTF uses the CFH12k mosaic camera, with a field of view of 7.9 deg$^2$ and a plate scale of 1″ pixel$^-1$, mounted on the Palomar Observatory 48 inch Samuel Oschin Telescope. The PTF operation strategy is devised to probe the existing gaps in the transient phase space and to search for theoretically predicted, but not yet detected, phenomena, such as fallback supernovae, macronovae,. Ia supernovae, and the orphan afterglows of gamma-ray bursts. PTF will also discover many new members of known source classes, from cataclysmic variables in their various avatars to supernovae and active galactic nuclei, and will provide important insights into understanding galactic dynamics (through RR Lyrae stars) and the solar system (asteroids and near-Earth objects). The lessons that can be learned from PTF will be essential for the preparation of future large synoptic sky surveys like the Large Synoptic Survey Telescope. In this article we present the scientific motivation for PTF and describe in detail the goals and expectations for this experiment.