TITLE: Free product of categories
QUESTION [14 upvotes]: Is there a general construction of the "free product" of categories? I'm not sure how to characterize such a thing precisely, but here is an analogy: the free product of categories should be to the free category on a quiver as the free product of monoids is to the free monoid on a set. This would be useful when formulating statements like "this category is generated by these subcategories subject to these relations."

REPLY [5 votes]: As Higgins pointed out in his papers and book, the useful construction for groupoids is what he calls the universal groupoid $U_\sigma(G)$ on a set $Y$ determined by a function $\sigma: Ob(G) \to Y$. Once you have set up a normal form for this, then you have normal forms for free groups and free groupoids and free products of groups and  groupoids, where the last are really determined by a pushout on object sets. 
These constructions are relevant to topology using the fundamental groupoid on a set of base points and the corresponding generalisation of the theorem of Seifert-van Kampen. 
The inclusion of the category of groups into the category of groupoids has a left adjoint which can be defined using the above universal construction. Also this inclusion of categories preserves colimits of connected diagrams. 
Similar considerations presumably apply to (small) categories. 
Jan 23, 2019: A method for constructing colimits of groupoids, and analogously for small categories, is given in Appendix B of Nonabelian Algebraic Topology, using the notions due to Grothendieck of fibred and opfibred (or cofibred) categories. They were developed initially to deal with the situation of sending a module $M$ over a ring $R$ to the ring $R$, and the lifting of ring morphisms $S \to R, R \to T$  to the module category. They  also apply to sending a crossed module of groups  $M \to P$ to the group $P$, and to the functor  $Ob$ sending a groupoid, or small category, to its set of objects.  
In the general case of a functor $\Phi: \mathsf X \to \mathsf B$ there are useful criteria involving such notions for  computing colimits of a functor $T: \mathsf C \to \mathsf X$ in terms of colimits of $\Phi T$ (Theorem B.3.4 loc.cit). 
In particular it is useful to see both small categories and groupoids in terms of the fibration and opfibration properties of the functors $Ob$ from these categories to the category of sets.