THE PHYSICS OF GALAXY FORMATION