To panic is to become filled with fear and anxiety. Someone in a panic is totally freaking out.
Have you ever heard someone say "Don't panic"? That's easier said than done. People panic when they lose control over themselves because of fear, stress, or danger. A pilot who runs into turbulence and then flees from the cockpit has panicked. A surgeon who makes a mistake might panic for a second, before chilling out and helping the patient. It's hard to do a good job when you panic. Panicking is pretty much the opposite of relaxing.