Maybe I'm being unfair putting the word "real" in quotes there. Ian Fleming knew spies; during World War II, he ran an entire covert operations branch of one of Britain's spy services, section 30AU (Assault Unit 30) of British Naval Intelligence. James Bond is usually assumed to be a composite character of a couple of the actual spies under Fleming's command during the war. If so, I doubt they felt flattered. Fleming's attitude towards his fictional spy is "realistic" to a level bordering on thinly veiled contempt. But then, here's the thing that Fleming knew that most (completely ignorant) authors of spy fiction don't seem to realize: if James Bond were an actual superspy, he wouldn't have "adventures." Super spies live the most boring (looking) lives of anybody on the planet. They enter some position of trust and access on the other side of a border, and then slavishly and carefully pretend to be someone so boring that nobody thinks twice about the fact that he's there when interesting things are discussed. The only, and I mean only, risky or interesting thing that actual successful spies ever do is send reports home, and under most circumstances even that's a fairly easy bit of routine using techniques perfected all the way back during the Renaissance. I mean seriously, you could train a retarded inbred puppy to make undetectable coded dead drops. (Actual Israeli retired superspy Wolfgang Lotz, widely praised as the most successful spy in the history of the profession, has written two highly-praised books on the subject of what real spy work is like, his autobiography, The Champagne Spy, which I haven't read, and A Handbook for Spies, which I have read and can't praise highly enough.)
So in order for his spy novels to be even vaguely entertaining to read, Ian Fleming had to invent a fictional spy who was too stupid to do his job in the boring, reliable way, but resourceful enough (on some level) to give the books a happy ending by in some way minimally completing his mission. Hence, the actual origin of James Bond, in the first Bond novel, Casino Royale. It's not long after WWII, early in the Cold War, and British Military Intelligence has a problem, and his name is James Bond. He's a former WWII commando, moderately decorated, and from a politically well connected family that wants him to get whatever job he wants if the ruling party is going to continue receiving their support. And what he wants is to be a spy, even though he shows no particular aptitude for it. So "M" sends him on what ought to be the world's easiest mission: spend a week at the Casino Royale in Monaco watching a guy who gambles there regularly, the come back and report on how much money he loses and anything interesting you happen to overhear. Bond, however, being a total idiot, manages to blow his cover in a matter of hours, gets himself captured, gets brutally tortured at length for information he doesn't have ("M" is no fool), and finally gets rescued by more competent spies than himself. He is then offered (and strongly encouraged to take) full medical retirement; as a victim of torture in his country's service, he's certainly entitled. But no, Bond still wants to be a spy, and his family still won't let them retire him. So British Intelligence reluctantly transfers him to the Fuck-Up Division. They maintain a small department of spies so stupid that we know they can't manage the trivial job of maintaining a cover identity, so they only get sent on jobs that don't require a cover identity: mostly assassinations. Hence, the "double-oh" division, and Bond's famous covert "license to kill."
Over the course of the books, there comes to be a cliché plot that Fleming used over and over again; not in every Bond story, but in almost all of the full-length novels. Bond gets sent to snoop around some suspected threat long enough to verify that the guy really is a threat, then deal with him. Being still an idiot about maintaining a cover identity, Bond every single time and without exception blows his cover by doing or saying something truly stupid. For example, the James Bond martini is one of Fleming's little inside jokes. The kind of upper-class British twit that Bond is usually pretending to be would actually order a gin martini, stirred, not shaken. Bond can't even get that right. And why do you think it's such a cliché about this supposed super-spy constantly introducing himself to suspects by his real name? British intelligence learned early on that James Bond is too stupid to remember his cover name, so they made up a cover using his real name. Not that it lasts past about the 4th book or 5th, I forget. He's also a legendary clothes snob, and a brutally misogynistic skirt-chaser, and frequently finds ways to screw up his missions through either or both of those affectations. (There is no evidence that Fleming intended his characterization of Bond as anything other than an indictment of Bond himself, or of spies as a class; Fleming himself has no such reputation as a misogynist in his other writing or in his personal life.)
But here's the thing, the origin of the other cliché of the Bond novels that Cubby Broccoli did keep and made such a stock plot device that it's widely parodied: this becomes the standard method by which Bond actually finds out what the villain is plotting. Sometimes it's because while the villain is dithering over whether or not to kill a British agent, Bond sees too much. Sometimes it's because Bond finds out from one of the villain's henchmen or one of the villain's captives who knows too much. But what's the cliché? Sometimes the villain can't resist monologuing. And the signature Bond method for saving the day is to reveal to the villains' partners or underlings just how dire a future they're actually in for once the main villain betrays them; usually it's one of them, not Bond, who saves the day by betraying their boss or partner. That, and a legendary ability for taking a beating and surviving, are the real James Bond's only two talents.
(Another of my favorite telling details: all through the series, the head of the "Q division" is constantly after James Bond to get rid of that awful stupid "lady's purse gun" he carries, his beloved .32 caliber Walther PPK. It's ridiculously inaccurate, and prone to jamming after the first shot. Bond himself never denies it, and the unreliability of that stupid gun propels several of the plots. Why won't Bond give it up? Because it's the only gun he's found that fits well in his tux. And besides, as he constantly reminds Q, a real spy shouldn't need to fire his gun very often, it should be enough for a real spy to have one to wave at people occasionally in an emergency. Too bad for Bond that he's not that guy.)
And the thing is, Fleming really did hit upon a winning formula for a great spy novel, one that lets him fit in all kinds of writerly details about stuff that the fans found fascinating, like travelogue bits about the various hot spots of the cold war and various insights into and lifestyle details of the spy, terrorist, assassin, and mafiosi lifestyles of Bond and his various opposition figures, along with plenty of sex and violence, and with two predictable sources of intrigue. You tear your way through the first half of the book trying to figure out the villain's plot (and knowing that Bond won't) and waiting with bated breath to see what stupid mistake Bond is going to make this time, then you tear your way through the last half of the book to see how is Bond going to get himself out of this mess, who's going to bale him out of trouble this time and what's it going to cost him? I love 'em. I'm probably overdue to reread them. Anyway, thanks for the fond memories of some really fun books, Ian Fleming!
P.S. As far as I know, one and only one of the classic Bond movies is an almost scene-for-scene adaptation of the book: Sean Connery as James Bond in Guy Hamilton's 1964 Goldfinger. If you want to get a feel for the real James Bond and don't have patience for or can't stand the books, that's the movie to rent or borrow.