How should I interpret a homotopy schematic? I'm having trouble really making sense of these homotopy schematics from May's A Concise Course in Algebraic Topology

Here's what I understand so far:
 - The top and bottom rows are different compositions of paths, and the schematics are aiming to show equivalence.


*

*The schematic represents the "run time" of the loop with longer or shorter lengths of the square's edge. For example, in the top row first loop $f$ is run at double time, $g$ and $h$ are run at double-double time.

*The left side of the square shows $c_x$ as the constant path through point $x$, and the right side shows that both compositions of loops end up at point $w$.


Here is what I don't understand:


*

*Is this just a statement of equivalence? Or do these schematics go some way to explain why these compositions of loops are equivalent?

*I don't fully understand what the vertical lines represent. This isn't like a mapping diagram, is it?

*Why is this called a 'domain square'?

*Do the diagonals show how a potential path homotopy between the two compositions could go? Is it meant to suggest one?

 A: I had a lot of difficulty with these schematics when I first saw them as well - I could roughly understand what they were trying to show, but not how they provided any proof for me. It was helpful for me to actually write out an equation.
So, let's take a look at the first diagram. I do want to point out that you're referring to $f$, $g$, and $h$ as loops, but (unless I'm missing something about the context in May) they are generally not. Note that to concatenate these paths you'll have $x = f(0)$, $f(1) = g(0)$, $g(1) = h(0)$, and $h(1) = w$. If these were loops you'd have that all of these were equal, so in particular we'd have x=w - which might be true, but isn't necessarily so. 
The square is illustrating the domain of a function, $H: I \times I \to X$. We have three paths, $f: x \mapsto y$, $g: y \mapsto z$, $h: z \mapsto w$. Every point $(s,t)$ on the left diagonal line maps to $y$ and every point $(s,t)$ on the right diagonal line maps to $z$. 
In order to have a path homotopy between $(f \cdot g) \cdot h$ and $f \cdot (g \cdot h)$, we need to have that for all $t$, $H(0,t) = x$ and $H(1,t) = w$, so that for all $t$, $H( - , t)$ is a path from $x$ to $w$. We also need that $H$ is a homotopy between our desired paths; ie that $H(-,0) = (f \cdot g) \cdot h$, and $H(-,1) = f\cdot(g\cdot h)$. 
We define $$H(s,t) = \left\{ \begin{array}\\
f\left(\frac{4}{t+1}s\right) & s \in \left[0, \frac{1}{4}t + \frac{1}{4} \right] \\
g(4s-t-1) & s \in \left[\frac{1}{4}t + \frac{1}{4}, \frac{1}{4}t + \frac{1}{2} \right] \\
h\left(\frac{4}{2-t}(s-1)+1\right) & s \in \left[\frac{1}{4}t+ \frac{1}{2}, 1\right] \\
\end{array} \right.$$
You can verify that this $H$ fulfills all the conditions mentioned above, so $H$ gives us a path homotopy between $(f \cdot g) \cdot h$ and $f \cdot (g \cdot h)$. 
The thing is that given the domain diagram, there was only one way to write this equation. It helped me to see that I could come up with the equation that matched the diagram, but as you can see it is an ugly equation and admittedly it took a while. That's why it's left just as the domain diagram without much else explanation, but it's a little opaque at first. 
It might be worth trying to write these equations for the other two diagrams (they're much simpler) to convince yourself of these ideas. 
A: Emma's answer is very insightful, but I wish to provide an alternative that may help as well. This idea comes from Hatcher as well as one homework question I've done (credit: HW3 in http://www.math.lsa.umich.edu/~jchw/2022Math592.html).
Before we consider these schematics, let's do a lemma first: If $\gamma:I\rightarrow X$ is a path, $\phi:I \rightarrow I$ such that $\phi(0) = 0, \phi(1) = 1$, then $\gamma \circ \phi \simeq \gamma $ $rel \{0, 1\}$. This is an easy exercise.
With this lemma in mind, we can get rid of $f, g, h$'s and just think about how to construct a $\phi$ to reparametrize your path and send one thing to another. For the first schematic $(h \cdot g) \cdot f = h \cdot (g \cdot f)$, you concatenate $h, g$ first, and then with $f$. On the left hand side, your path in X behaves like $h$ on $[0, \frac{1}{4}]$, behaves like $g$ on $[\frac{1}{4}, \frac{1}{2}]$, and behaves like $f$ on $[\frac{1}{2},1]$. On the right hand side, your path behaves like $h$ on $[0, \frac{1}{2}]$, behaves like $g$ on $[\frac{1}{2}, \frac{3}{4}]$, and behaves like $f$ on $[\frac{3}{4},1]$.
Now let's look at your first schematic (though my f, g, h may be reversed because I consider the order of concatenation from left to right). We want to send $[0, \frac{1}{4}]$ to $[0, \frac{1}{2}]$ (leftmost trapezoid), send $[\frac{1}{4}, \frac{1}{2}]$ to $[\frac{1}{2}, \frac{3}{4}]$ (middle parallelogram), and send $[\frac{1}{2}, 1]$ to $[\frac{3}{4}, 1]$ (rightmost trapezoid). So $\phi$ can be set to be a piecewise linear function (which is fairly easy). In other words, this square is partitioned such that the horizontal lines in the same partition must "match" in their (corresponding path) behavior, so this will give you an idea when you are trying to construct the reparametrization. Id is easier and you can try a similar method.
PS: This idea only works well with associativity and id (but not the inverse), because I can't seem to find a good parametrization of $\gamma \cdot \bar{\gamma}$ to do that. Please edit this post if you do find a way to resolve the issue. In my opinion though, this problem is merely a simple technical issue and the flaw is permitted.
A: I will explain the way I do it. Take, for example, the first one $f \cdot ( g \cdot  h) \simeq (f\cdot g) \cdot h$.
Then we now want to find an homotopy $F(s, t)$ with the form
$$
  F(s, t ) = \begin{cases}
 f(a_1(s, t)) & s \in [b_1(t), b_1'(t)] \\
 g(a_2(s, t)) & s \in [b_2(t), b_2'(t)] \\
 h(a_3(s, t)) & s \in [b_3(t), b_3'(t)]
  \end{cases}
$$
where $a_i(s, t)$ is a function that evaluated at the boundaries  $b_i(t), b_i'(t)$ is $0$ and $1$ respectively, in order to achieve the condition $f(1)=g(0)$ and  $g(1)=h(0)$. The trick to fulfill the condition is to make $a_i(s, t)= \frac{s-b_i(t)}{b_i'(t)-b_i(t)}$.
The drawing helps us to describe the borders $b_i(t), b_i'(t)$ of the piecewise function $F(s, t)$. The lines are the borders of the function (with $s$ as $x$-coordinate and  $t$ as $y$-coordinate), in this case
$$
\begin{cases}
  t = 4s-1 \\
  t = 4s-2
\end{cases}
\implies 
\begin{cases}
 s \in \left[0, \frac{t+1}{4}\right]\\
 s \in \left[\frac{t+1}{4}, \frac{t+2}{4}\right] \\
 s \in \left[ \frac{t+2}{4}, 1 \right]
\end{cases}
$$
Once we have computed $b_i(t)$ and $b_i'(t)$, we get $a_i(t, s)$
$$
a_1(s, t) = \frac{s-0}{\frac{t+1}{4}} = \frac{4s}{t+1}, \quad a_2(s, t) = \frac{s-\frac{t+1}{4}}{\frac{t+2}{4}-\frac{t+1}{4}} = 4s-t-1, \quad a_3 = \frac{s-\frac{t+2}{4}}{1-\frac{t+2}{4}} = \frac{4s-t-2}{2-t}
$$
Finally we have the homotopy
$$
  F(s, t ) = \begin{cases}
 f(\frac{4s}{t+1}) & s \in \left[0, \frac{t+1}{4}\right] \\
 g(4s-t-1) & s \in \left[\frac{t+1}{4}, \frac{t+2}{4}\right] \\
 h(\frac{4s-t-2}{2-t}) & s \in \left[\frac{t+2}{4}, 1\right]
  \end{cases}
$$
