So in Minecraft found a Guardian. I'm not sure if it's hostile or not. It really scared me I'm ashamed to admit it. But anyway in survival will this attack me or not?
Guardian Minecraft Wiki entry, first line, first sentence
The Guardian is an underwater hostile mob
As for whether it'll attack you, it depends on where you are. If you're on land it will quickly move towards the nearest water source, at which point they swim away. So as long you're not in between it and a water source, you should be fine.
it depends on the situation, when naturally spawned mostly foe. you can summon a completly friendly guardian with command blocks. you can also spawn a completly evil guardian that floats in air, always follows you, can kill you instantly in survival or even creative mode, unlimited range, unlimited sight(and can see through any block), can shoot through any block and has unlimited HP. yea you do not want to spawn that. you can even make one that acts like an ender dragon underwater. yep.