How does an octopus get energy?

same as most animals, food