The Nintendo Wii U is capable of playing games from a large number of past Nintendo consoles. Most are emulated Via the virtual console. This allows cartridge based games to be played on the Wii U without the need for a hardware addon.
The GameCube used discs that are smaller than regular sized DVDs. Nintendos previous console, the Wii, was able to play GameCube Games. The Wii U is able to play Wii games by completely emulating the consoles. This essentially means that you have a Wii built inside the Wii U. You an use the emulated Wii operating system to play GameCube games.
Due to hardware changes you cannot directly use GameCube hardware with the Wii U. There are USB devices that you can buy that will expand the systems functionality allowing you to use GameCube hardware with the Wii U.