This lecture discusses the generation of primordial magnetic fields in the early universe and their implications for cosmology. The instructor begins by outlining the significance of relics in observational cosmology, particularly focusing on the cosmic microwave background (CMB) and its potential to reveal information about the universe's history. The discussion then shifts to the mechanisms of magnetic field generation during inflation, emphasizing the role of phase transitions and the conditions necessary for creating significant magnetic fields. The instructor presents arguments against the late-time generation of magnetic fields, highlighting the challenges in producing the observed microgauss fields in galaxies and voids. The lecture further explores the backreaction of these magnetic fields on inflaton perturbations, detailing how this interaction can affect the evolution of the universe. The instructor concludes by summarizing the findings and suggesting that the presence of large-scale magnetic fields, especially in voids, could indicate their primordial origin, providing insights into the early universe's conditions.