The particle production process is reviewed, through which cosmic inflation can produce a scale invariant superhorizon spectrum of perturbations of suitable fields starting from their quantum fluctuations. Afterwards, in the context of the inflationary paradigm, a number of mechanisms (e.g. curvaton, inhomogeneous reheating etc.) through which such perturbations can source the curvature perturbation in the Universe and explain the formation of structures such as galaxies are briefly described. Finally, the possibility that cosmic vector fields also contribute to the curvature perturbation (e.g. through the vector curvaton mechanism) is considered and its distinct observational signatures are discussed, such as correlated statistical anisotropy in the spectrum and bispectrum of the curvature perturbation.