Learn (something) by rote

To memorize something without thinking about what is being learned.

The children learned the material by rote but they did not really understand it.