Out of the blue is an English idiom meaning “suddenly and unexpectedly”. You can use it when you are surprised by something that was not expected to happen. For example,
How did people come up with such a strange idiom? The meaning of the word “blue” is revealed by a longer (but much less common) version of the idiom: out of a clear blue sky. “The blue” refers to the blueness of the sky.
Yet another version of the idiom reveals what comes out of a clear blue sky. It is possible to say that something unexpected is a bolt from the blue. While it would make sense that this “bolt” is a projectile fired from a crossbow (these are called “bolts”, not arrows), it is much more likely that it simply refers to a thunderbolt, i.e. lightning accompanied by thunder—who would expect a thunderbolt from a clear blue sky?