The nature of high-redshift galaxies