From the Super Mario Wiki
Assembly Blocks are special platforms appearing in Super Mario Galaxy and Super Mario Galaxy 2. They come in different varieties, including red or brown octagons, purple cubes, and green and blue rectangular platforms, which are the most common. Normally, they will float around in space; however, when Mario or Luigi comes near them, they will suddenly move into place around him, creating a path for him above a bottomless pit.
Super Mario Galaxy
In Super Mario Galaxy, Assembly Blocks appear in the Space Junk Galaxy and Bowser's Galaxy Reactor. In the Space Junk Galaxy, Mario encounters many of these platforms at the end of the first mission. These platforms branch out into five different pathways, each one holding a Silver Star at the end. Mario has to traverse the Assembly Blocks and collect the five Silver Stars to form a Power Star. Mario also finds Assembly Blocks in the Speedy Comet mission and the Purple Comet mission for that galaxy, as both missions involve the same Assembly Blocks area. The format for the Space Junk path is different in the Purple Comet mission, to accommodate the 100 Purple Coins.
In Bowser's Galaxy Reactor, pieces of Assembly Blocks appear near the Ice Planet and in the fifth area, being the only means to traverse these areas. These platforms are different, as they are fragile and will shatter several seconds after the path is formed. Near the Ice Planet, there are cube-shaped Assembly Blocks platforms made of ice that Mario can skate on. The fifth area is composed almost entirely of floating Assembly Blocks in the shape of rectangular prisms. Mario must walk along these platforms in 2-D, while avoiding Fire Bars and encountering gravity fields.
Super Mario Galaxy 2
In Super Mario Galaxy 2, Assembly Blocks appear in the Cloudy Court Galaxy and Rolling Masterpiece Galaxy. Assembly Blocks appear only in the Cosmic Clones mission in Cloudy Court Galaxy, where they form paths for Mario in lieu of the Cloud Flower. Mario also encounters Assembly Blocks acting as walls, as Mario needs to Wall Jump up a specific area instead of using clouds. Only the green-and-blue rectangular variety of Assembly Blocks appear here.
In the Rolling Masterpiece Galaxy, Assembly Blocks appear on the Palette Planet. Mario must ride the Star Ball across a short pathway of these platforms. Again, only the green-and-blue rectangular variety appear here.
Names in other languages