How do galaxies form and evolve over cosmic time, including the processes of gas accretion, star formation, and mergers, and what are some key observational techniques used to study galaxy formation?