Let $f\colon Z\to X$ and $g\colon Z\to Y$ be functions. What is a pushout of $f$ and $g$ in $\mathsf{Set}$? Different sources and questions on this site claim that it's the quotient of the disjoint union $X\sqcup Y$ by the equivalence relation $\sim_R$ generated by the relation $R = \{ ((0,x),(1,y)) \in (X\sqcup Y)\times (X\sqcup Y) \mid \exists z \in Z, x = f(z)$ and $y = g(z) \}$.
Define functions $i_1\colon X\to X\sqcup Y/{\sim_R}$ and $i_2\colon Y\to X\sqcup Y/{\sim_R}$ by setting $i_1$ to map each $x \in X$ to the equivalence class $[(0,x)]$ and $i_2$ to map each $y \in Y$ to the equivalence class $[(1,y)]$.
For $X\sqcup Y/{\sim_R}$ together with $i_1$ and $i_2$ to be a pushout in $\mathsf{Set}$, we first must have $i_2\circ f = i_2\circ g$. It's easy to check that it's so.
Now, let $j_1\colon X\to Q$ and $j_2\colon Y\to Q$ be functions so that $j_1\circ f = j_2\circ g$. We seek a function $u\colon X\sqcup Y/{\sim_R} \to Q$. $u\circ i_1 = j_1$ and $u\circ i_2 = j_2$. Of course, for these identities to hold, this hypothetical function $u$ must satisfy $u([(0,x)]) = j_1(x)$ and $u([(1,y)]) = j_2(y)$ for any $x \in X$ and $y \in Y$. But I'm not sure how to prove that this data indeed defines a function. We need to prove that it is independent of the choice of $x$ and $y$. Of course, this needs to use the fact that $j_1\circ f = j_2\circ g$.
It is clear that $u$ thus defined is really a function on all of the quotient space, because the quotient map is surjective. Whenever you define anything on a quotient by means of representatives, you check that it is well defined by considering different representatives.
If I denote by $\pi$ the quotient map, we want to show that if $\pi((0,x)) = \pi((1,y))$, then $u(\pi((0,x))$ = $u(\pi((1,y))$. The condition implies that there is a (possibly non-unique) $z \in Z$ with $f(z) = x$ and $g(z) = y$. Applying $j_1$ to the first and $j_2$ to the second equality yields $j_1 (x) = j_2(y)$ by the condition. But that implies precisely $u(\pi((0,x))$ = $u(\pi((1,y))$. Hence, $u$ is well defined. Can you explain why $u$ is also unique?
As a continuation, you may want to consider the following: this diagrammatic property of the pushout characterizes the pushout. If any other set $P$ has the pushout property, then there is a canonical bijection between the 'abstract' pushout you defined and the new pushout $P$. The proof of course uses the property of the pushout.