From the Super Mario Wiki
A Freeze Cannon is an enemy from Wario World. Freeze Cannons appear only in Shivering Mountains. They are small brown creatures stationed inside black dome shaped machines with a cannon that shoots a freezing stream of ice. Should Wario touch it, he freezes in place and the player must wiggle the Control Stick to break him free. Freezing does no damage, but it does leave Wario susceptible to attacks from nearby enemies.
Freeze Cannons cannot be defeated. However, Ground Pounding them temporarily puts them out of commission.