Can anyone explain to me the principles of how loading animations that occur between loading pages work?

Any example is . The logo "field" animates with shifting colors when you direct yourself to a new page. As you can see it's also built in WP (pretty impressive in my opinion).

So can anyone tell me the underlying concepts involved? I'm prepared to the reading I need to do to figure out the details.

Thanks in advance.