To panic is to feel so nervous or afraid that one cannot think clearly.
Everyone panicked when the house caught on fire.
Example picture