This particular object is in the shape of a cuboctahedron--an Archimedian solid that is particularly fun to play with. With twenty-four bits of straw and a long piece of string, you can build one of your own and morph it into various shapes yourself. The task of building a cuboctahedron incidentally involves learning a bit of geometry and graph theory, along the way.
The cuboctahedron I made uses straws for its edges. The cuboctahedron has twenty-four edges, so if you want to build it, you'll need twenty-four identical straw pieces and a string at least as long as all of the straw pieces combined. The string only needs to be in one continuous piece--it's possible to wrap the string through each straw, passing through each straw segment once and only once, with the end of the string finishing at the same place it started. This way, you can knot the two ends of the string together and have a flexible cuboctahedron with minimal knotting.
The type of string path we want around the edges of the cuboctahedron, a path that starts and ends in the same place after passing through each edge only once, is called an Eulerian circuit. It's only possible to complete on the edges of solids if an even number of edges meet at each vertex. It's easy to see why--in order to have a complete cycle, at every vertex, the path of the circuit must both enter, and then leave that vertex. Since each vertex can only be traversed once, each "entering" path must be paired with an "exiting" path. If you don't believe me, you can try building solids that don't satisfy this property with only one single piece of string. Mathematics guarantees you will inevitably fail, though you can still build these solids with the less nice more-than-one-string-required property if you want.
Here is the Eulerian circuit I used in my cuboctahedron. There are other ways of "lacing up" the toy, too! At each vertex, I wrapped the string around itself a few times so that all four edges would hang together nicely. This also let me space out the ends of the straws, and gave the toy a little bit more flexibility (a bit of engineering and experimentation helps).