Cephalopods belong to the large group of animals known as molluscs. Generally molluscs do not move well, and when they do, it is by either gliding over a slime track or by using their external shells. But not the cephalopods. Cephalopods move very quickly and with very precise movements when that is needed. Most animals that move with similar speeds have either external (insects, crustaceans) or internal (vertebrates) skeletons. As muscles in principle only contract, animals with skeletons use those as levers, with muscles attached to the skeleton by tendons and by contracting moving the levers on each side of joints. Seemingly complicated, giving rise to both high speed and very precise movements, essentially all this is just plain physics, and more or less nothing to be surprised about.
Enter the cephalopods. Most cephalopods have just a single hard structure, the beak, but still are able to move fluently, in complicated patterns, with a control that seemingly is at least on par with animals with skeletons. This is somewhat surprising, as we know that muscles only supply power by contracting, which for a soft, skeleton free animal should lead to it ending as a contracted blob of muscles doing absolutely nothing. Swimming is performed by a number of animals without hard skeleton parts, An example would be jellyfish, that in their medusa stage swims just by contracting their bell-shaped body with a series of circular muscle, moving water backwards and the animal forwards. Relaxing tension on the ring shaped muscle will slowly extend the medusa again, thus “loading” the muscle again.
However, the real feat for a soft animal is to be able to do quick and very controlled movements and at the same time extend parts of its body, such as the arms of an octopus. Octopus walk, dig, manipulate, use tools and can even open lids on cans with no major problem. They do this by combining the use of longitudinal and circular muscles. Extremely simplified, longitudinal muscles will be held rigid while the circular muscles contract on those, making the whole thing move. It is pretty obvious that this is what happens when cuttlefish use their extended tentacles to catch prey,
but this is also the basis for the millimeter precise (or 16th of an inch-precise for those of you that are still imperial) movements of the tips of the tentacles of octopus.
Such precise and complex coordination of very large numbers of different muscle groups obviously will require some processing power. It is not unlikely that this is the proximate reason for the high intellectual capacity of cephalopods, with the stunning applications such as using tools and understanding complex patterns being a later addition.