What really is a colimit of sets?
Solution 1:
To make my answer clearer, firstly I describe some basic concepts in category theory.
- Suppose you have two categories $A$ and $B$ and functor $T\colon A\to B$. Then we can take its limit $\varprojlim T$ and its colimit $\varinjlim T$(see definitions here: limit and colimit). They may not exist(or one of them may not exists), but if they exist, then they are objects in $B$, defined up to isomorphism. Note that a colimit of $T$ is nothing but a limit of the dual functor $T^{op}\colon A^{op}\to B^{op}$.
- Suppose you have a graph $D$, a category $B$ and a diagram $F\colon D\to B$. Then you can take a limit(respectively, colimit) of the diagram $F$, which is nothing but a limit(respectively, colimit) of the corresponding functor $C[F]\colon C[D]\to B$, where $C[D]$ is a free category on the grath $D$.
- Well, now we can take limits and colimits of $\mathbf{Set}$-valued functors $T\colon A\to\mathbf{Set}$ and $\mathbf{Set}$-valued diagrams $F\colon D\to\mathbf{Set}$. From 2 we understand that we can reduce our problem to (co)limits of $\mathbf{Set}$-valued functors. There is an important result about such (co)limits: Theorem. Let $A$ be a small category and $T\colon A\to\mathbf{Set}$ be a functor. Then the colimit(respectively, limit) of $T$ exists and given by a formula(in the case of colimit): $$ \varinjlim T=\coprod_{a\in A}T(a)/\sim $$ where $\sim$ is the minimal equivalence relation on $\coprod_{a\in A}T(a)$, contains all pairs $((a,x),(a',x'))\in\coprod_{a\in A}T(a)\times\coprod_{a\in A}T(a)$, such that there exists a morphism $f\in Arr(A)$, $f\colon a\to a'$ satisfying $(T(f))(x)=x'$. The proof is straightforward.
- Direct limit in modern mathematics is nothing but a colimit(but in some literature you can find this term in the meaning of directed colimit, see 5).
- There is a notion of directed colimit which is a colimit of a functor from a preorder, corresponding to some directed set. This is, of course, the special case of the aforementioned construction.
Solution 2:
Limits and colimits don't coincide in $Set$. Just like any colimit, it suffices to understand coproducts and coequalizers. A coproduct of a family $\{A_i\}_{i\in I}$ of sets is their disjoint union. More formally, take $$X=\bigcup_{\{i\in I\}}\{i\}\times A_i$$with the obvious injections $A_i\to X$. Then $X$ is a coproduct. Let me know if you need help figuring out coequalizers.
Solution 3:
There is a structure theorem (or existence theorem) for limits (resp. colimits) which says they're built by composing the taking of products and equalizers (resp. coproducts and coequalizers).
Since colimits commute with colimits, you can lump all the coproducts on one side and all the coequalizers on another. Doing so one way gives you a quotient of a big disjoint sum. The other way gives you a big disjoint sum of quotients. When the functor you're taking the colimit of is a group action, the latter way is the content of the orbit-stabilizer theorem.