Magnetic robots walk, crawl, and swim