During this talk, we will recall how the use of microlocal analysis permits to understand in a mathematically rigorous way the perturbative construction of interacting quantum (scalar) field theories on flat and curved backgrounds. In particular, we will characterize the wave front set of the propagators and of the two-point functions of free quantum field theories. Hence, using the HÃ¶rmander criterion of multiplication of distributions we will define an algebra generated by all possible interaction Lagrangians. The properties of the product in this algebra encodes the results of Wick theorem. Furthermore, microlocal analysis permits to prove that the ambiguities present in the construction of time ordered products among various interaction Lagrangians are local. Thanks to this observation, the procedure of renormalization, needed in the construction of time ordered products, can be understood as a problem of extending distribution to certain submanifolds of codimension at least 4. In the physical literature, the ambiguities present in this procedure are called renormalization freedom. This freedom can be classified in a similar way as in the problem of extending homogeneous distributions.