I understood most of this from  Introduction to the language of stacks and gerbes (section 2)  by Ieke Moerdijk and from stacks project Stackification of fibred categories. It is necessary to know what is the sheafification of a presheaf to understand what is the stackification. I studied sheafification from Hartshorne's Algebraic geometry book. You can choose what you are comfortable with. I will mention the result first as in Lemma \(8.8.1\).
Lemma : Let \(\mathcal{C}\) be a site.  Let \(p:\mathcal{S}\rightarrow \mathcal{C}\) be a fibred category over \(\mathcal{C}\). There exists a stack \(p':\mathcal{S}'\rightarrow \mathcal{C}\) and a morphisms \(G:\mathcal{S}\rightarrow \mathcal{S}'\) of fibred categories over \(\mathcal{C}\) such that
  1. for every \(U\in \text{Ob}(\mathcal{C})\) and \(x,y\in \mathcal{S}(U)\),  the map \(\text{Mor}(x,y)\rightarrow \text{Mor}(G(x),G(y))\) induced by \(G\) identifies the right hand side with the sheafification of the left hand side.
  2. For \(U\in \mathcal{C}_0\) and \(x'\in \mathcal{S}'(U)\) there exists a covering \(\{U_i\rightarrow U\}\) such that each \(x'|_{U_i}\) is in the essential image of the functor \(G:\mathcal{S}(U)\rightarrow \mathcal{S}'(U)\).

We recall what is \(\text{Mor}(a,b)\). This is a presheaf on \(U\) defined as follows. Given an inclusion \(i : V\hookrightarrow U\) we have \(i^*(a),i^*(b)\in \mathcal{S}(V)\).