These lecture notes describe the general properties of our planetary system and those around other stars and how these are explained in models for star formation.