Principles of propulsion by magnetically actuated soft bodies