This toy is also known as a SCUBA Steve or simply a Cartesian Diver.
The diver dan is based on buoyancy. Squeezing the bottle exerts as pressure throughout the contained fluid. This pressurized fluid rises into the opening at the bottom of the , making the pipette heavy and sinking it. Releasing the bottle reduces the pressure around the pipette, allowing the trapped air inside the pipette to expand, increasing it's buoyancy and allowing it to float.
We've seen this same experiment done with tomato sauce packets, biro lids, Freddo frog packets... really any small trapped air space can work, you just need to be able to fit it into the bottle and weigh it down to keep it floating upright. Have fun!