Shoggoths were large, amorphous cretures that could take any shape they so desired.
"It was a terrible, indescribable thing vaster than any subway train—a shapeless congeries of protoplasmic bubbles, faintly self-luminous, and with myriads of temporary eyes forming and un-forming as pustules of greenish light all over the tunnel-filling front that bore down upon us, crushing the frantic penguins and slithering over the glistening floor that it and its kind had swept so evilly free of all litter." -- H.P. Lovecraft
The shoggoths were created by the Elder Things. Being amorphous, they could take on any shape needed, making them very versatile within their aquatic environment. Though able to "understand" the Elder Things' language, they had no real consciousness and were controlled through hypnotic suggestion.
The shoggoths built the underwater cities of their masters. Over millions of years of existence, some shoggoths mutated and gained independent minds. Some time after this, they rebelled. Eventually, the Elder Things succeeded in quelling the insurrection, but thereafter watched them more carefully. By this point, exterminating them was not an option as the Elder Things were fully dependent on them for labor and could not replace them. It was during this time that, despite their masters' wishes, they demonstrated an ability to survive on land.