The aim of this paper is to develop a framework for localization theory of triangulated categories C, that is, from a given extension-closed subcategory N of C, we construct a natural extriangulated structure on C together with an exact functor Q : C -> (C) over tilde (N) satisfying a suitable universality, which unifies several phenomena. Precisely, a given subcategory N is thick if and only if the localization (C) over tilde (N) corresponds to a triangulated category. In this case, Q is nothing other than the usual Verdier quotient. Furthermore, it is revealed that (C) over tilde (N) is an exact category if and only if N satisfies a generating condition Cone(N, N) = C. Such an (abelian) exact localization (C) over tilde (N) provides a good understanding of some cohomological functors C -> Ab, e.g., the heart of t-structures on C and the abelian quotient of C by a cluster-tilting subcategory N.