DescriptionWe prove some results on the existence and compactness of solutions of a fractional Nirenberg problem involving nonlocal conformally invariant operators. Regularity properties for solutions of some degenerate elliptic equations as well as a Liouville type theorem are established, and used in our blow up analysis. We also introduce a fractional Yamabe flow and show that on the conformal spheres it converges to the standard sphere up to a M"obius diffeomorphism. These arguments can be applied to obtain extinction profiles of solutions of some fractional porous medium equations, which are further used to improve a Sobolev inequality via a quantitative estimate of the remainder term.