As in the second definition, take two paths $p:[0,1]\rightarrow X$ and $q:[0,1]\rightarrow X$ that have the same start and end point, let $\tilde{q}$ denote the reverse path, ie the one that goes the other way, so $p(1)=\tilde{q}(0)$. The concatenated path $p\cdot \tilde{q} :[0,1]\rightarrow X$ satisfies $p\cdot \tilde{q}(0)=p\cdot \tilde{q}(1)$, so is equivalent to a map $p\cdot \tilde{q}: S^1\rightarrow X$. Intuitively, this map does $p$ on one half of the circle and $\tilde{q}$ on the other half.
The first definition now tells us that $p\cdot \tilde{q}$ extends to a map $F:D^2\rightarrow X$, where we can think of $p$ mapping from one side of the boundary and $q$ mapping from the other. Now define a homotopy from $p$ to $q$ by "moving across" the disk $D^2$ using $F$. To write this down succinctly we can write $F$ as
$F:[0,1]\times[0,1]\rightarrow X$
with $F(0,t)=F(1,t)$ for all $t\in[0,1]$. Then define the homotopy $F_t$ from $p$ to $q$ by $F_t(s)=F(s,t)$. This is definitely continuous, it fixes $\{0,1\}$ (so is a homotopy rel $\{0,1\}$) and it satisfies $F_0=p$ and $F_1=q$ by construction.