Up in his office on the sixth floor of the Palace theatre, in the heart of London's theatreland, Stephen Crockett is letting me in on a secretive world. The walls are lined with posters for hit shows he has worked on: from Chicago to almost every Andrew Lloyd Webber musical; from Mamma Mia! to Jerry Springer: The Opera. His desk is buried beneath piles of newspapers, CVs and headshots. But – showing me a photograph of performer Dianne Pilkington, just cast in Mamma Mia! – he assures me it's organised chaos. This is the mysterious world of the casting director.

They are rarely interviewed. Few people outside theatre, film and TV know who they are. Yet casting directors rank among the most influential operators in showbusiness. As the people who find the right actors for plays, TV series, adverts and films, they stand between every young actor and that big break. As an actor friend told me: "Casting directors are the gatekeepers. If they don't know who you are, it can feel impossible to get a decent part."

So who are they, and what do they do? To find out, I tracked down four. As well as Crockett, who casts musicals as part of Grindrod Associates, they are: Andy Pryor, whose film and TV work includes Doctor Who; Wendy Spon, head of casting at the National Theatre; and Lucinda Syson, who has cast Hollywood films such as Batman Begins, Troy and X-Men. They are sadly unanimous on one thing: I won't be attending auditions. As one of them puts it: "Asking an actor if they mind someone sitting in is a bit like asking a woman if she minds someone watching her gynaecological examination." I'll take that as a no.

In his eyrie on the sixth floor, Crockett tells me that casting for a musical takes about six weeks. "We send a breakdown of the characters we need to a number of agents – usually between 200 and 300. Within a day or so, hundreds of envelopes arrive back. We divide them into characters and go through every CV, deciding who to call." For a major show, Crockett might receive 1,000 CVs; from these, he'll choose around 500 performers for the first round of auditions, then whittle those down to a shortlist of "recalls". These last auditions are usually attended by a show's director, who will make the final choices.

It's a dizzying task, made harder by the sheer volume of performers around today. Spotlight, the directory that actors pay to join, comes in five volumes for each gender, updated annually (two actors per page, with a headshot and brief CV), and an ever-expanding website. There are also a huge number of actors' agencies. "Agents pop up like weeds, frankly," Crockett says. There are, he says, only around 50 agencies he takes seriously. "Essentially, from a casting point of view, you're going to go with somebody you trust."

Actors without an agent will try to get in touch with casting directors off their own bat. This isn't frowned upon, or at least not exactly: most casting directors' email addresses are listed in the Actors' Yearbook. But they don't go out of their way to publicise their details. "If people really wanted to get hold of us, they would know how to," Andy Pryor tells me in his office (this one more neatly ordered than Crockett's) in London's Clerkenwell. "But we're not going to put our street address on everything, because we are inundated – we get around 10 emails from actors a day, plus hard-copy CVs."

Some actors even send presents. Pryor grimaces. "The worst," he says, "is when you get a card with a teabag in it, and the card is filled with glitter – so that when you open it, it goes all over you. They say, 'We just wanted to get your attention.' It's like, 'Yes you did. Now we've got to clean this shit up.'"

Pryor has occasionally called in an actor on the strength of an unsolicited CV, but the usual process is, again, to go through trusted agents, or to invite performers he's seen on stage. Pryor trained as a stage manager, and worked at London's Bush and Royal Court theatres before becoming a casting director (there is no formal training). He goes to see plays, especially new ones, three or four nights a week, always talent-spotting: not long ago, he and his assistant spotted Jack Farthing at the Royal Court. They cast him first in a small role in Stephen Poliakoff's series Dancing on the Edge, followed by a bigger part in the BBC1 comedy Blandings. "Theatre is where you see people at their best," Pryor says. "You often see actors playing very much against type: that way, you get a great idea of their range."

What comes through most strongly, in talking to Crockett and Pryor, is how much they love actors: how far from secretive and intimidating they strive to be. At the National, Wendy Spon, arguably the most influential casting director in British theatre today, gives the same impression. "You have to like actors and value what they do," she says. "And want them to feel comfortable and nurtured. When they come for auditions, we meet them at the lift, give them water, tell them what to expect. Nerves do funny things to people. We've had a few people cry."

As a public institution, the National may have more of a responsibility to be clear about its process – yet no contact details for Spon and her team are listed on the theatre's website. The workings of, say, the literary department are much more obvious, with clear instructions on how to submit a play. Spon explains that the casting section is being reworked, adding: "We do have a responsibility to be available to people. We don't do open calls, but actors can invite us to see plays: we read everything we receive, and we're out seeing hundreds of plays every year. We're not intentionally mysterious. I'd be disappointed if people felt they were knocking on a door that was never open."

How does a casting director go from looking at a CV, a headshot, or even an actor on stage, to deciding that they're the embodiment of a character? I'm struck by how much of this seems to hinge on instinct. Spon points out, however, that it's the director's instinct that ultimately counts. "It's not about my vision," she says. "I could read a play and think, 'Oh, the perfect person for this part is whoever.' And then the director says, 'I see it like this.'"

Casting a major feature film involves walking an even more precarious tightrope between filming schedules, actors' availability and studios' tastes, as Lucinda Syson explains in her tiny attic office in Soho. We talk in the "taping room", where auditions are filmed; one wall is light blue, apparently the most flattering colour for skin. "Many producers look at casting," says Syson, "and think of it as just finding people for individual roles. It's actually about a total alchemy. You've got to be able to tune into the director – to where they're shooting, to what the undertones and sense of the project are."

With a Hollywood film, the casting process usually takes three months; for a European movie, it can be up to a year. Like the other casting directors, Syson works through agents, but does sometimes hold "generals": meetings where an agent sends in an actor in the hope that something suitable might be coming up. Britain's Aaron Taylor-Johnson came in for a general just before Syson started casting 2010's Kick-Ass, and got a lead part. "I was literally sharpening a pencil," Syson says, "and his agent sent him in. It was unusually good timing."

I quiz all four casting directors on the perils of typecasting. Many of the non-white actors I've interviewed over the years have felt excluded from lead roles, or confined to stereotypical parts. They all say they think about this a lot – and that things are changing for the better. "Most people working on our side of the industry," says Pryor, "have a completely open mind – it's just about finding the right person at the right time. And it's a much better time now for actors from ethnic minorities. There was a time when only white, middle-class kids thought they could be actors. Now, we have more black actors coming through."

Spon has one final reflection on her role. "It's a curious job. You're in a position of influence but not power: we don't ultimately decide who gets the job, but we can influence who's in the frame. It's not just about having an opinion – it's about having an informed opinion based on seeing work over a number of years." She laughs. "That's quite a hard slog."

• This article was amended on 4 June 2013 because the original said Spotlight, the directory that actors pay to join, was just one volume a decade ago. Spotlight has been more than one volume since 1946.