“Flack,” a new drama centered on the chaotic world of a celebrity publicist named Robyn (Anna Paquin), starts with a dilemma: A superstar chef is about to be exposed as a cheating womanizer. Robyn knows the drill. Time to distract the public with another story — preferably a sympathetic one.

“Illness is always good. Anything wrong with any of your kids? Downs, meningitis, learning difficulties?” she asks. The chef is appalled, then remembers that his wife’s mother died of breast cancer. So Robyn arranges the perfect photo op — he will take his wife to get a mammogram, under the guise of being a concerned, loving husband. When the chef expresses doubt about this plan, Robyn gives him a withering look. “You’d be surprised what people believe if they want to,” she says.

Pop TV’s “Flack,” which concludes its first season Thursday night, joins the pantheon of scripted TV shows that pull back the curtain on the inner workings of the celebrity universe. The plotlines are obviously exaggerated — except the above scenario, which creator Oliver Lansley said is based on a real-life situation. (“The true story is actually worse,” he added.) But Lansley is most fascinated by our society’s evolving relationship with publicity. It’s no longer a “slightly elusive, mystic art,” he said. Everyone can essentially be their own PR machines with a cultivated social media presence, especially in an era where facts can be declared meaningless and “the truth” is different depending on who you ask.

Luckily, the painstaking, frequently lucrative task of shaping a star’s image has always been about making people see what they want to see.

“In a way, publicists are offering us alternate realities, and we can choose the ones we like the most,” Lansley said. For example, we might know it’s a bit coincidental that two actors who need to promote a movie are suddenly in a relationship, but we’ll still scroll through every Instagram photo and gobble up the tabloid details. “We’re just starting to realize the huge power of it, and it’s changing our culture in a massive way.”

Lansley has heard mixed reactions from publicists who watched the show. Some say, “Oh my God, someone finally put my life on screen,” as others insist it’s not at all realistic. While many PR reps will go to great lengths to protect a celebrity’s image, the job is more likely to involve sleep deprivation or unpleasant conversations with a magazine editor than concocting a “possibly fake cancer” scam.

“I wish I had something to tell you, but for us, honesty is the best policy,” said Cece Vance, who represents many musicians and is the author of “The Life Struggles of a Celebrity Publicist.” She added, “If we’re lying on our client’s behalf, we’re at least going to make it believable.”

Yet as “Flack” dives into Robyn’s life, it doesn’t directly answer the question people often wonder: What, exactly, does a high-powered celebrity publicist do?

Ask a real public relations executive, and you’ll receive many answers: They make sure their star clients are portrayed in a certain light and maximize press opportunities. They book interviews in magazines and newspapers, on talk shows and podcasts. They figure out how to spin unflattering stories and ask websites to take down photos, and sometimes get lawyers involved. They navigate photo shoots and award show appearances. They advise and counsel how to deal with the media. And much more.

“My job is to carefully mold the public image of an artist — sometimes you’re pushing them into the limelight, and sometimes you need to know when to push them out,” said Sasha Brookner, owner of Los Angeles-based Helio PR. “That’s the paradox of publicity.”

Of course, it has grown infinitely more complicated with social media, as a celebrity can decide to tweet or post anything they want, and it immediately takes off around the Internet. Years ago, if an actor was, say, arrested for drunken driving, the reps would have time to get ready for the story to break: They could preview the mug shot, get court documents, start damage control. Now, a publicist may see the incident go viral on Twitter before the client even has a chance to get in touch.

But the onslaught of news via social media has led to an inadvertent advantage. Given that everyone is bombarded every day with so much news, it has become easier for bad press to quietly disappear. People are so distracted that they’ll probably forget about the story anyway. It doesn’t necessarily have the negative impact on a star’s career that it did in the past.

“The bad news is that everybody sees it in three seconds,” said Susan Patricola, a public relations executive who has represented celebrities since the 1970s. “The good news is that someone else is in the news three seconds later.”

Multiple publicists say that if there’s one misconception about their jobs, it’s that it’s all glamour, flying in private jets and strolling down red carpets. There might be perks, but it can be grueling (and nonstop) work. Public relations is typically on the lists of “top stressful jobs,” which “most people would be shocked” to learn, Vance said.

Part of the stress is the constant communication — it’s a relationship-driven field, particularly with the celebrity press. Publicists tell stories of negotiating with the tabloids, saying things such as “If you don’t run this story about this actress being pregnant, we’ll give you the first photos of the baby,” or “If you don’t publish those photos of this married actor cozying up to a young woman at a bar, he’ll grant you an interview.”

“Flack” shows Paquin’s character at odds with reporters, and any celebrity journalist can tell you nightmare stories involving furious emails and phone calls, and threats to never work with the publication again. But publicists say these types of interactions are the exception, not the rule, even if there are disagreements about the coverage.

“It doesn’t mean you have to be nasty, it doesn’t mean you have to be pushy — you just have to have knowledge of how people operate,” Patricola said. When things get adversarial, the question becomes, how can the situation benefit both parties? “If neither one of us gets what we need or want, the whole exercise is pointless.”

As the PR game changes behind the scenes, the public has also grown savvier about the system. Ben Affleck was mocked when, in the middle of his clumsy response to the Harvey Weinstein scandal, pictures suddenly surfaced of him adopting a stray puppy. One Twitter user wrote: “I’ll take ‘Ridiculously Obvious PR Diversion Stunts’ for $1,000 Alex.” Sometimes the stars expose it themselves as a way of shooting down a story. Last year, Olivia Munn posted a text message exchange in which her publicist told her that In Touch magazine planned to run a piece about her supposedly dating Justin Theroux. (Munn: “Oh my god. That is so stupid.” Publicist: “I know. I can try and shoot it down. But they will still run with it.”)

Even as observers pride themselves on being able to spot PR work a mile away, it can still be difficult to discern — especially when, these days, people can silo themselves into their own media bubbles and decide the truth is whatever they want it to be.

“The power of image and the power of PR is so incredibly strong, and our whole society at the moment is built on it,” Lansley said. “I think it’s just a fascinating world, and people are just starting to open their eyes to it now.”