There are different types of galaxies including elliptical galaxies, spiral galaxies, and irregular galaxies. Elliptical galaxies do not have ongoing star formation while spiral galaxies do. Irregular galaxies do not fit into a defined shape category. The formation of galaxies is influenced by density - denser regions collapse first under gravity to form protogalaxies that then separate into cores and halos, with flatter structures forming when densities were highest.