I think I understood what a pushout is but I don't understand examples at all.
- Example: Let $X_1$, $X_2$ (both open or both closed) form a cover of $Z$, then $\require{AMScd}$ \begin{CD} X_1 \cap X_2 @>{incl_{X_1}}>> X_1\\ @V{incl_{X_2}}VV @V{incl}VV\\ X_2 @>{incl}>> X_1 \cup X_2 = Z \end{CD}
I am really confused why $Z$ is a pushout? Wouldn't we need another space $Z'$ with $X_1 \xrightarrow{\text{f}} Z' \xleftarrow{\text{g}} X_2$ such that the square commutes and there exists homeomorphism between $Z$ and $Z'$? If yes, then what would be $Z'$?
What if I had this situation: $Z = (0,1) \subset \mathbb{R}$ with $X_1 = (-\frac{1}{2}, \frac{1}{2}) $ and $X_2 = (0, \frac{3}{2}) $, then could I have $Z'=(-1,1)$?
- Non-pushout $\require{AMScd}$ \begin{CD} \varnothing @>>> [0,\frac{1}{2})\\ @VVV @V{incl}VV\\ [\frac{1}{2},1] @>{incl}>> [0,1] \end{CD}
With this one my notes just say that we can't find $Z'$, is that enough?
I will interpret your problem in the simple case when $Z$ is covered by two subspaces (two subsets $X_1,X_2$ whose union is $Z$).
The claim is the following: the square of inclusions $$\begin{array}{ccc} X_1\cap X_2 &\to& X_1 \\ \downarrow && \downarrow_{j_1}\\ X_2 &\underset{j_2}\to& Z \end{array}$$ is a pushout in the category of topological space. Note that this requires $Z$ to be a certain set, equipped with a certain topology, and none of these requests can be dropped. A set $Z'$ with the same cardinality, but with a different topology than the one prescribed by the universal property of the pushout, will not be the pushout. This was the content of my comment above, the pushout of $[0,\frac 12) \leftarrow \varnothing \to [\frac 12,1]$ (i.e. the coproduct of those two topological spaces) is not $[0,1]$ with the Euclidean topology; it's the set $[0,1]$, but it has a topology that makes it disconnected.
Now to your first example. In order to prove the claim it is enough to prove that
The square $(\star)$ above, now, gives you two continuous functions $q_i : X_i\to Q$ with the property that if $x\in X_1\cap X_2$, then $q_1(x)=q_2(x)$.
Then, you can define $q : Z\to Q$ as follows: if $x\in X_i\subseteq Z$, send it to $q_i(x)\in Q$. Is this a function? Yes: it is well-defined (an element in $Z$ has a single image) precisely because of condition $(\star)$.
The hard part now is to equip $Z$ with a topology that makes $q$ continuous. The general rule is described here and I'd rather not repeat it. The important part is that with this topology, $q$ becomes continouous, and this topology is the finest with this property (it has the most open subsets).
Now, both the topology and the function $Z\to Q$ are characterized uniquely, so yo proved 1. and 2.
To see that the pushout $P = [0,\frac 12) + [\frac 12,1]$ is not $[0,1]$, one can note that the topology on $P$ has $[\frac 12, \frac 34)$ as one of its open sets, but this is not open in $[0,1]$ with the Euclidean topology (more: it can't be homeomorphic to any open $U\subseteq [0,1]$). Or you can use the fact that homeomorphic spaces are both (path) connected or both not (path) connected. $P$ is not path connected (prove it), whereas $[0,1]$ is. Or again, observe that for every continuous function $\varphi : [0,1] \to P$: the image of $\varphi$ must be a compact subset of $P$, which is not itself compact, so no such function can be surjective...