  This paper is devoted to studying the two-weight extrapolation theory of
Rubio de Francia. We start to establish endpoint extrapolation results
including $A_1$, $A_p$ and $A_\infty$ extrapolation in the context of Banach
function spaces and modular spaces. Furthermore, we present extrapolation for
commutators in weighted Banach function spaces. Beyond that, we give several
applications which can be easily obtained using extrapolation. First, we get
local decay estimates for various operators and commutators. Second,
Coifman-Fefferman inequalities are established and can be used to show some
known sharp $A_1$ inequalities. Third, Muckenhoupt-Wheeden and Sawyer
conjectures are also presented for many operators, which go beyond
Calder\'{o}n-Zygmund operators. Finally, we obtain two-weight inequalities for
Littlewood-Paley operators and Fourier integral operators on weighted Banach
function spaces.
