“We’re supposed to be wearing masks,” the host said as I entered a birthday party in Pennsylvania recently. He rolled his eyes and waved his hand in the air, as if to say, “Whatever. We know we should wear them, but we know we’re all OK.”

I glanced around. No one was wearing one, though a few masks dangled loosely around people’s necks or sat on tables near plates and glasses.

I considered whether to put one on and, as a doctor, did so. People glanced at me hesitantly, noticing. I felt awkward.

Two people strolled over, about two to three feet from me, unmasked and drinking beers. They seemed a bit uneasy, as if guilty about their uncovered faces, and I felt as if they were wondering whether I was somehow therefore judging them, or didn’t fully trust them, or was merely being unsociable.

The chocolate birthday cake looked delicious and I was hungry. But I couldn’t eat or drink with the mask on, and debated whether to take it off, and reluctantly did so.

Other people walked over to say hello. I took two steps backward, but they then stepped forward. I pondered whether to re-cover my face. If I did, would I then appear overly nerdy, anxious, neurotic or “uncool,” or should that not matter, since I would be protecting other attendees — even though they didn’t seem to care — and me?

Clearly, masks are crucial in protecting us and others from Covid-19, but no one likes wearing them. They’re hot and uncomfortable, impede breathing, steam up eyeglasses, cloak facial expressions, hamper communication and are inconvenient. More than once I’ve arrived at a store and realized I forgot to bring one and had to return home.

As a psychiatrist, I have also seen how they create complex interpersonal dynamics. Many of us now have to determine regularly whether to wear one with all family, friends or others — whether they and we are all “safe” and trust we have all been safe with others. These decisions can be hard. Most people, I suspect, have at times not worn masks when they should have.

Social groups have also been creating and reinforcing their own norms around masks through subtle and not-so-subtle pressures and expectations. “Whenever my extended family gets together now,” a friend told me, “we argue about whether we all need to wear masks. My brothers keep saying, ‘What, you don’t trust us?’”

As the sociologist Erving Goffman pointed out, within groups, people generally seek to “pass” and to avoid behaving in ways that others may see as stigmatizing, “tainting” or bad. Many people hesitate to don masks because of implicit group pressures and concerns about what others may think. Generally, people want to be liked and accepted, not rejected or shunned. They seek to appear friendly and open, not hostile, paranoid or afraid. Yet these deep-seated emotional reactions are now hurting us in ways that public health experts and the rest of us urgently need to address far more than we have.

Stigma can, however, work both ways, either boosting or blocking behaviors that can be lifesaving for public health. Smoking went from being a “cool” norm to being widely frowned upon, though that took years of medical research and public health campaigns. Before 9/11, you could leave your suitcase in an airport terminal momentarily to go to the bathroom; now it triggers fear and police intervention, likewise reinforced by unceasing public messages: “If you see something, say something.”

In the mid-1990s, as a faculty member in Columbia’s School of Public Health, I engaged in fierce debates about whether to try to stigmatize people who didn’t wear condoms. Many advocates for AIDS patients argued that we would then be “blaming the victim,” since people living with H.I.V. would thereby be forced to reveal they had the virus. But public health experts persevered, arguing that anyone who is sexually active with multiple partners should wear a condom, not just those who were H.I.V.-positive. Celebrities like Magic Johnson reinforced the message by publicly disclosing their own infections and urging safer sex practices, helping to increase condom use.

A number of competing psychological factors can play a role in whether people decide to wear masks. Research suggests, for example, that if few people in a community are wearing a mask, others are more likely to think that these individuals are at increased risk for being infected. But as the virus spreads in a community, norms can shift. Now, in my own Manhattan neighborhood, it can feel stigmatizing not to wear a mask. Everyone seems to don one. If you don’t, people give you dirty looks or eye you warily. I, too, have looked askance at carelessly unmasked passers-by.

But elsewhere, mask wearing runs the gamut. At a Pennsylvania Walmart I visited, despite signs announcing that the state required masks in stores, many people lacked them, and no one seemed to care. I’ve seen Manhattan bars packed with young people in the evening with no one covering their face. It seemed to be “cool” not to care.

According to studies, people who have had personal experience with a particular risk think it’s more likely to occur, and they weigh it more heavily in their decisions. Generally, young people have known fewer people with severe Covid-19 symptoms and therefore are less concerned.

Research suggests, too, that the more people see others with masks, the more likely they are to wear one themselves. Exposure to groups covering their faces makes people feel less strange about also doing so.