From the Super Mario Wiki
Cuby is the fourth snow spirit Mario and Sonic the Hedgehog meet during the Adventure Tour in Mario & Sonic at the Olympic Winter Games. It is the snow spirit of Cubyrinth, hence the shortened "Cuby" for its name. Mario and Sonic first find it in Polastraits, guarded by Eggman Nega. After defeating him, they free Cuby and it joins the team after Pola stays in Polastraits. If the player has four yellow crystals, it can break the ice walls in Cubyrinth.