It was probably done during compositing, but you could do something like it in 3d as well.
You could achive something similar by displacing a matrix of cubes with an image; however that's pretty advanced for someone new. If you're still interested take a look here: https://forums.cgsociety.org/showthread.php?t=840961
Imagination is more important than knowledge.