We don't understand how they work. We know how to make them, but much like the human brain, the very low level workings are beyond our understanding.
Broadly it can be said that LLMs work by reducing uncertainty. Interestingly, human consciousness is also theorized by some to work the same way, react to the input in ways to reduce uncertainty.
Internally that is probably something similar that is happening, but as far as I can tell it was never designed to specifically do that. Here is an example of the things GPT-4V is capable of: https://blog.roboflow.com/gpt-4-vision/amp/