So a thought bubble is usually drawn with more cloud-like features and is representative of internal thoughts. When the bubble is linked to a character, it is done so by a progressively smaller series of clouds.
A speech bubble represents spoken dialog and are surrounded by a single round or oval shape, with the linking portion being a conical shape, made from the same single line.
These aren't always a hard rule, and in the first panel, we have an internal monolog in a bubble that does not connect to the character, which typically means it's a narrative voice (comics are somewhat unique in they can have elements of both first and third person narration, which is a growing trend over a third person narrator in these boxes). You can tell the difference in the way the bubble is drawn with the edges making multiple ray like points, compared to the dialog boxes which are much more simpler in design. You can also tell because the light haired individual and dark haired individual are responding to these texts.
Not sure about the final panel, but it seems like a stylized text box to show the character is injured and their thoughts/speech are disjointed and weak due to the injury.