It is just a animation of a ball and it's shadow. The ball is going in the same line the entire time, but the difference in shadow makes it look like it is rolling, flying, or bouncing.
Credits to a science video I watched that first showed me this brain trick.