In this thesis, I study the connections between extremal eigenvalue problems and the existence of extremal function for the $generalized$ Moser-Trudinger type functional. Using the method of blow-up analysis, we prove that if $(M, g)$ is a closed Riemann surface which is not diffeomorphic to the sphere, then the generalized Moser-Trudinger type functional could attain its minimum by a smooth function. This result implies the first extremal eigenvalue of $M$ in the conformal class of $g$ is greater than $8\pi$. We also consider surface with boundary. Under the Dirichlet boundary condition, we prove the existence of extremal function for the generalized Moser-Trudinger type functional. Under the Neumann boundary condition, if the generalized Moser-Trudinger type functional has no minimizer, we give a specific lower bound of the functional.