In January, the shooting of Gabrielle Giffords produced a half dozen bona fide heroes, including Patricia Maisch, a 61-year-old woman who snatched ammunition out of alleged gunman Jared Loughner’s hands as he tried to reload. For good reason, people like these earn our respect and adulation; their grace under pressure strikes us as almost superhuman. Yet as we marvel at their deeds, we’re always left wondering about where, exactly, this composure comes from. Do these people emerge from the womb with sanguine looks on their faces, ready to perform life-saving surgery in the next room if necessary? Or is their coolness something they picked up through life experience?

When I was researching Nerve, my new book about how people deal best with fear, pressure, and stress, I got quizzed about this constantly. Is cool-headedness born, people wanted to know, or is it made? We’ve been arguing about this question since the days of Socrates, but until recently, psychologists had very little hard data about how genes and experience interact to determine how we respond under stress. We now have a far more solid idea of where cool comes from, however. Poise under pressure, it turns out, does indeed have a strong genetic component—yet our poise is mostly the result of what we do to build it up throughout our lives.

Let’s start with the “nature” side of the equation. For every one of us, the starting point for cool-headedness comes bundled within our DNA: our innate disposition toward anxiety. It’s never been a secret that anxiousness is partially inherited (my parents, for example, had me pegged as a future neurotic from the first time my brow furrowed), but no one knew how much influence our genes threw around until psychiatrist Kenneth Kendler came along. In a 2001 study, Kendler and his colleagues examined 1,200 pairs of male twins, some identical and some fraternal, probing into each brother’s individual phobias. Because all of the twins shared the same upbringing, yet only the identical twins shared the same DNA, Kendler could filter out environmental factors altogether and calculate a pure figure for our genetic susceptibility to anxiety. The answer? Genes account for around 30 percent of our anxiousness.

“Aha!” we might exclaim. “Cool under pressure is 30 percent genetic, then.” Well, not quite. After all, anxiety certainly influences our poise in stressful situations, but being anxious doesn’t always lead to falling apart—far from it. Some of history’s coolest customers have also been nervous wrecks. Boston Celtics center Bill Russell, who led his team to 11 NBA championships, was legendary among his teammates for his pre-game anxiety; until the end of his career, Russell grew so nervous that he threw up before every single game. When Laurence Olivier was delivering the most lauded theatrical performances of his life, he too suffered from such intense stage fright that he asked people to physically push him onstage. Feeling anxious and flopping while under fire, then, don’t necessarily go hand in hand.

The first people to perform useful studies specifically on composure in crisis were World War II combat researchers, who could examine soldiers under literal fire. In 1943, one of these men, a British officer named Lionel Wigram, noticed a pattern in his studies of infantry units on the Italian front. Whenever a 22-man platoon encountered enemy fire, Wigram realized, the troops always responded in the same proportions: A few soldiers would go to pieces and try to escape, a few more would react valiantly, and the vast majority would enter a sheeplike state of bewilderment, unsure of what to do. Wigram wasn’t a scientist, but his insight about our instinctive reactions to crisis was remarkably accurate. According to modern research by survival psychologist John Leach, when a random group of people finds itself in a sudden emergency like a fire or a natural disaster, 10 to 15 percent will consistently freak out, 10 to 20 percent will stay cool, and the rest will become dazed and hesitant sheep.

These aren’t exactly inspiring figures for those of us who fantasize that we’d respond to a mugger with a heroic flurry of karate kicks—and the situation is about to get bleaker. When researchers have studied those who naturally stay composed in crisis, they’ve uncovered evidence that their poise has a biological underpinning. Yale psychiatrist Andy Morgan, for example, has studied elite Special Forces recruits as they undergo “Survival, Evasion, Resistance, and Escape” training, a three-week course designed to simulate the tortures of enemy capture. The program is brutally stressful, yet many recruits preserve an amazing amount of mental clarity in the midst of it. When Morgan examined the poised trainees’ blood tests, he saw that they were producing significantly more of “a goofy little peptide called neuropeptide Y” than other, more rattled recruits. The extra NPY was like a layer of stress-deflecting mental Kevlar; its effects are so pronounced that Morgan can tell whether a soldier has made it into the Special Forces or not just by looking at a blood test.

At this point, the evidence appears to be stacking up against cool-headedness as something we can learn. Our anxiety is one-third predetermined? Less than one-fifth of us naturally react well to crisis? But not so fast! Before you start fretting about the size of your NPY endowment, consider this: While we may have a few coolness-thwarting tendencies encoded in our genes, these predispositions still don’t even tell half of the story of how we become poised under pressure. Recent research overwhelmingly shows that with effort and smarts, we can more than counteract our natural inclinations and cultivate enduring cool.

Our first route to heightened poise is through training. Although the studies on WWII soldiers and disaster victims might seem grim, a vital caveat is in order: Virtually none of those people had been well-trained for the situations in which they found themselves. (These days, even recreational paintball players receive better live-fire preparation than WWII troops ever got.) Most of them reacted like dazed sheep not because they couldn’t show composure, but because they simply didn’t know what to do. Training changes this. Psychologist Anders Ericsson has shown that whether we want to keep cool amid machine gun fire or just stay poised in a presentation at work, the most effective single thing we can do is to practice the task under realistic conditions until it becomes second nature. As Ericsson’s colleague David Eccles told me, even simple chores like fire drills can radically help to produce a better response when crisis strikes. Solid preparation “washes out” our natural dispositions, planting the seed for adaptive behavior in our brains well ahead of time.

Another, newer method for building coolness hinges on a different kind of training: teaching ourselves resilience-enhancing beliefs about stressors. If that idea sounds like Grade A psychobabble to you, then you obviously haven’t been reading Consulting Psychology Journal. (What, you don’t subscribe?) Study after study has shown that people who function well under stress share several core beliefs: They tend to see times of change and uncertainty not as dangerous but as exciting opportunities; they focus on what they can do to improve a stressful situation, rather than growing helpless; and they maintain a sense of commitment to the world around them, instead of withdrawing. Some people are simply born with these attitudes, but psychologists have demonstrated that they can be learned as well. One of them, University of California-Irvine’s Salvatore Maddi, says kids who complete his “hardiness” course—in which students learn new coping behaviors and beliefs about stress—earn higher GPAs than those who don’t. The U.S. Army is such a believer in these classes that it now puts all of its 1.1 million soldiers through its own stress resilience course.

And finally, we arrive at what may be the most crucial ingredient in composure, an idea that is simple to understand but tricky to master. In all of the hours I spent researching Nerve, I almost never came across a case in which a cool-headed hero didn’t feel afraid; the vast majority dealt with plenty of fear, just like Russell and Olivier. What truly separated them from the pack was this: While many who fizzle under fire battle against anxiety and vilify their nerves, these poised people understand that fear doesn’t have to hold them back—it can even help them. This switch to a friendlier view of fear is more than mere sleight of hand. Studies of everyone from classical musicians to competitive swimmers have found no difference at all between elites and novices in the intensity of their pre-performance anxiety; the poised, top-flight performers, however, were far more likely to describe their fear as an aid to success than the nonelites. No matter what skill we’re trying to improve under pressure—working on deadline, public speaking, staying cool on a first date—learning to work with fear instead of against it is a transformative shift.

Of course, following these tips won’t make you into a paragon of poise overnight. (As Charlie Sheen has taught us, only people with tiger blood and Adonis DNA are capable of instantly achieving feats like that through the power of their minds.) Make no mistake, though: Regardless of what our genes have to say about it, smart training, building resilient attitudes, and developing a better working relationship with fear can help us achieve true grace under pressure. It takes effort to get there, but hey—after you become the next cool-headed hero in the news, it’ll make a great story for your bestselling inspirational memoir.