The first picture shows a homotopy between two curves.

The second picture shows another homotopy between two loops, say u and v. Here the images of u and v are the same set, but the colourings are different, which means that u and v are different functions and so count as different loops.

The third picture is a reminder that he map u:[0,1] -> X need not be injective, or in other words that a loop is allowed to cross over itself.

The final picture shows two loops (say u and v) and a homotopy between them, where the intermediate stages are non-closed curves. Thus u and v are homotopic as curves, but they are not homotopic as loops.