Unlike many other incusions in the original Monster Manual of 1977, the gelatinous cube is an invention of Gary Gygax, not based on any other outside source. Unlike other of his inventions, like the Beholder or the Mind Flayer, the gelatinous cube has been released as Open Content since the game’s third edition.
A gelatinous cube looks like a transparent ooze of mindless, gelatinous matter in the shape of a cube. It slides through dungeon corridors, absorbing everything in its path, digesting everything organic and secreting non-digestible matter in its wake. If seen with a little metasight on its design, being a cube that is a perfect ten feet on each side, it is specifically and perfectly “adapted” to its native environment, the standard, 10-foot (3.0 m) by 10-foot (3.0 m) dungeon corridors which were ubiquitous in the earliest Dungeons & Dragons modules.
They lack sensory organs, but more than made up for that with an ability (blindsight) that allows them to discern nearby objects and creatures without needing to see, hear or smell them. Most oozes secret some corrosive sustance from their skin which can dissolve flesh and other materials very rapidly. They can resist close-range and melee attacks with ease by dissolving the wielder’s weapon into them.
Arcane oozes are found with alarming regularity in the depths of Sharn. Experts in the arcane have many beliefs on how arcane oozes were created, but no matter their origin, they all fear these huge creatures of green protoplasm, as they have the ability to drain spellcasting energies. Some believe that they were created by arcane spellcasters to defeat a rival group of arcane spellcasters; others believe that arcane oozes were created by some event, and that they will eventually drown out all arcane magics in the world. Arcane oozes have been seen within the floating citadel of Arcanix, home to the Arcane Congress. However, it is not sure if they are there to be studied, or to be created.
Arcane oozes will move and surround their foes. As their acid eats away at their spellcasting prey, they will also suck away their prey’s arcane energy, draining away the ability to create or cast spells. They then use this energy to heal themselves, or increase their strength. Arcane oozes are also immune to any type of magic, whether they be spells or spell-lie abilities. Attacks using acid against the arcane ooze will heal it.
In your campaign
Gelatinous cubes can be the easiest and hardest monster to avoid. Simply stepping out of its way can be more than enough, given their low speed, but that depends on how easy are they to be detected. Dark places can increase the difficulty for this, and particularly clear cubes can be almost impossible to discern when submerged in water. And that can be the trick to make it particularly deadly: have one at the bottom of a well showing rest of some items inside, so careless heroes will dive in to get some treasure without realizing the real danger.
You can find the game stats for a 5e’s Gelatinous Cube here.