From the Super Mario Wiki
The Rock Mushroom is an item that appears in Super Mario Galaxy 2, and is first found in World 2. The Rock Mushroom is primarily found in the Boulder Bowl Galaxy, and also appears in the Melty Monster Galaxy and Freezy Flake Galaxy.
When obtained, it turns Mario into Rock Mario. Rock Mario can encase himself in a boulder by shaking the Wii Remote, and can also accelerate by jumping and then shaking the Wii Remote. In this form, Mario can roll around and jump, damaging enemies and destroying purple crystals with items inside them. Hitting certain crystals or enemies will "break" the boulder, and he can shake the Wii remote to return to that form; he can also turn back to normal by jumping and pressing , cancelling his momentum, or else by slowing to a stop and remaining still for a few seconds.
Boulder Bowl Galaxy
The Rock Mushroom features heavily in Boulder Bowl Galaxy, with all of the galaxy's Power Stars and two of the Green Stars requiring the power-up to obtain them. One appears on the starting planet in a cage guarded by three Elite Octoombas, and more can be found on the boulder-covered planet and the large cage planet.
Freezy Flake Galaxy
In Freezy Flake Galaxy, one Rock Mushroom appears on the starting planet during Sorbetti's Chilly Reception; it can be found on the top side of a cabin. The power-up is needed to uncover Launch Stars on the starting planet; this leads to the Snowy Field Planet, where it is also required to retrieve five Star Chips in order to proceed to the next planet.
Melty Monster Galaxy
Rock Mushrooms can be found in Melty Monster Galaxy's rolling lane section and bowling course, and are required for obtaining the Power Star from those sections A Stroll Down Rolling Lane and The Chimp's Bowling Challenge, respectively. In addition, the button command that breaks Mario out of his boulder form is disabled during the former.
Names in other languages