While it can be obtain formally using the adjoint functor theorem as mentioned by Marc Hoyois in the comment. There are several explicit constructions.

First, the localization functor which send a small $(\infty,1)$-category $C$ together with $S$, a fullsubcategory of its arrow category, to the $(\infty,1)$-category $C[S^{-1}]$ can be seen as the left adjoint to the functor from the category of small $(\infty,1)$-category to the category of small $(\infty,1)$-category with a full subcategory of their arrow category "marked" which send send any $(\infty,1)$-category $C$ to $C$ with all the invertible arrows of $C$ marked.
It shouldn't be too hard to check that this functor is $\omega$-accessible and preserve limits.

There are however explicit construction of this functor that are worth mentioning. Dwyer-Kan localization, mentioned in Francesco Genovese answer is of course the first one historically (even long before $(\infty,1)$-category were a thing). But there is another one which I personally tend to like better, and which is more quasi-categorical:

In Higher topos theory Chap 3. Lurie introduce a model structure of "marked simplicial sets". If you take the "unbased" version (I.e. take "$S$" to be the terminal object everywhere) it is a model structure on marked simplicial sets (a marked simplicial set is a simplicial set with a collection of marked $1$-cells) whose fibrant object are the quasi-category in which the marked cells are exactly the invertible cells. This model structure is shown to be Quillen equivalent to the one for quasi-category, with the functor forgetting the marking being the right Quillen functor

Starting from a small quasi-category $C$ a nice way to construct its localization at a set $S$ of arrow is to take the marked simplicial set $C$ with all the arrows in $S$ marked and take a fibrant replacement in the model structure mentioned above (which is constructed relatively explicitly, using the small object argument).

Of course, without smallness assumptions on $C$ and $S$ there is no guaranty that the localization exists. Or, depending on your framework/philosophical stands, it always exists, simply because assuming some inacessible cardinal, you can apply all this machinery to the huge category large quasi-categories directly, but there is no guaranty that the localization is a locally small category (the hom can become proper classes in the localization process).