From the Super Mario Wiki
A Spring Topman is a green variant of Topman, appearing in Super Mario Galaxy. One first appears in the Buoy Base Galaxy near the area with the Water Shooters. It only appears when Mario/Luigi spins a wheel, causing it to appear through a small, Black Hole-like vortex. A similar robot known as a Jump Garage appears atop the tower, and can spawn Topminis. Spring Topmen later appear as part of the Dreadnought Galaxy's Topman Tribe; one here can spawn a Topmini if stomped on. A Spring Topman can use a spin attack which does not damage Mario, but pushes him away, possibly into other hazards that may hurt him.
If Mario tries to stomp a Spring Topman or spins it, its head will pop up, immobilizing it, and a second stomp will spring Mario up for a jumping boost (similar to when Mario jumps on a Spindrift in Super Mario 64). Mario must take advantage of this to reach high ledges and items. The only way to defeat one is to spin it into an electric fence.