The origin of large-scale magnetic fields is an unsolved problem in cosmology. In order to overcome, a possible scenario comes from the idea that these fields emerged from a small primordial magnetic field (PMF), produced in the early universe. This field could lead to the observed large-scales magnetic fields but also, would have left an imprint on the cosmic microwave background (CMB). In this work we summarize some statistical properties of this PMFs on the FLRW background. Then, we show the resulting PMF power spectrum using cosmological perturbation theory and some effects of PMFs on the CMB anisotropies.