Introduction. A Brief History of Ideas. Myth, Folklore and Prescient Ideas. The Renaissance and Later. The Modern View. Stellar Nurseries: Molecular Clouds. The Interstellar Medium: An Overview. Cloud, Clump and Core. Gravitational Collapse: The Jeans Mass. The Formation of Stars and Brown Dwarfs. A Collapsing Core. The Trouble with Brown Dwarfs. The Angular Momentum Problem: Disks and Outflows. Accretion Disks: The Birthplace of Planets. Keplerian Disks. How to Accrete? Jets and Winds. The Formation of Planets. Hot Jupiters, Super-Earths, and Waterworlds. Gravitationally Unstable Disks. Core Accretion. Migrating Planets. Unanswered Questions and Prospects for the Future.