In the second level in the first episode of LEGO Batman: the Videogame, you may get stuck being unable to walk up a wall or a pipe in Mr. Freeze's hideout using the magnetic boots. If not there, you may encounter other similar glitches as well, even with the AI-controlled character getting stuck in those same locations in single-player mode. In other cases, the game may freeze (no pun intended) every few seconds. There is a simple workaround for this.
If you've experienced the glitch in the video above or something similar, you may want to try turning on vertical sync in the graphics options menu whenever you encounter it. With vsync on, you should be able to progress beyond that point normally. I'd recommend turning vsync back off immediately after, though. At least on my system, the game tended to freeze every few seconds with vsync enabled. To unfreeze, just Alt-Tab out of the game and back in immediately.
That's a really weird bug and my best guess is that the game experiences a rounding error due to timing issues when the game runs at more than 60fps. The joys of running more than a decade old games on a Windows 10 system with faster hardware than was available when they were programmed. It might even be related to or exacerbated by the current NVIDIA graphics drivers and perhaps it is not an issue with other video cards or drivers.
TL;DR turn vsync off when you experience freezing, turn vsync on when you experience movement or AI glitches