The Physics of Galaxy Formation and Evolution