Realism isn't something most people associate with the fantasy genre, yet it's an essential element of great fantasy writing. Writers want to whisk readers to an alternate world filled with dazzling wonders. Not only do readers need to be engaged and entranced; but they must be convinced. It's your job as a writer to nurture that willing suspension of disbelief by shoring up your book with a plausible, lively, internally consistent backdrop. Your world should be as real in the minds of your readers as their own hometowns.
FIRST THINGS FIRST
Setting is the bedrock of your story. If you choose a real-world backdrop, be certain you get your facts straight. While you might be able to bend historical fact to a degree for the sake of story, you aren't going to get away with claiming that Roman senators wore plaid or that the Danube flows north. Manuscripts with too many errors like these seldom get further than an editor's rejection pile.
Creating a world from scratch presents somewhat different challenges, and more work. What's the weather like, and why? Do you know how weather works? Deserts and glaciers need to be set in specific areas for good reasons; savvy readers won't accept them in improbable places. The same goes for the location of towns and trade routes. (Your culture does have trade, right? The inhabitants don't live in a bubble where goods and services pop up magically for no good reason?) Climate dictates which crops will grow and, therefore, what people eat. It influences what clothing they wear and how they perceive themselves in relation to their gods and nature.
Who lives in your world? Does the story rely on many cultures interacting, or one in isolation? If there are more than one, do they all speak the same language, worship the same gods? Probably not. The differences can be used to create carnage or concord, and certainly color.
WAYS TO RESEARCH
The real world is the fantasy writer's scrapbook. Real history, real geography, real customs and religions are all invaluable sources of guidance and inspiration. There are many tools at your disposal—books, research librarians, the Internet, history classes, groups and associations—to help you find material for your fantasy's background. Once you begin to research, you'll probably never stop, as one solid, useful find almost always begets more. I didn't set out to learn about 12th century sewer systems or the medicinal uses of mud and maggots, but all of those things turned up in my searches and became important elements of various books.
If you set your story in Rome, Ireland or Sheboygan, for that matter, go there. If you're broke, set it in the town where you live, or where you grew up. A lot of my fantasy scenery is pure northern and coastal Maine, my ready-made sensory palette.
Add to your experience bank whenever you can; accrue interest to draw from. Being a writer is a nifty justification for having fun. Take horseback riding lessons. Buy a sword. Join a historical re-enactment group. Take up falconry. Try some medieval or ethnic recipes. I didn't start out as an archer, but I am one today, thanks to my character Alec, who needed to know what he was doing.
Keep a notebook or scrapbook. Jot down thoughts and feelings, paste in pictures, make sketches—whatever it takes to hold onto those sensations and information for later use.
There are a few bugbears of the fantasy genre that readers really loathe.
Anachronisms: These can be as glaring as a 10th century princess exclaiming, "Oh, as if!" or as subtle as a boat having gunwales in a pre-gunpowder culture. Pay attention to where you're finding your great ideas and make sure they fit, time-wise, into the overall picture you're trying to create.
Inaccuracies: Mongol hoards invading Mesoamerica. Warriors in 15th century plate armor flitting about with fencing foils. Limestone caves on volcanic islands. Horses that gallop for leagues without needing to rest or drink. These missteps hurt your book's credibility.
Information dumps: You do a lot of research, but only a fraction of it should ever reach the page. Don't lumber your fast-paced adventure with long-winded dissertations on how the wool trade works. Herman Melville got away with that sort of thing in Moby-Dick, but he wouldn't get it past an editor today. In most cases, detail should be the spice of the narrative, not the meat.
Unfired guns: If you go on at length about a cat, the reader is going to expect that cat to matter. Otherwise, it's just a distraction. The same goes for any detail that takes on an apparent significance through description. If you load a gun on Page 2, the reader will expect it to go off before the final paragraph. Don't leave unfired guns lying around your story. Or unfired cats.
The "oh, wow" factor: Many new fantasy writers try to add an "oh, wow" factor to their worlds by creating pink trees—a glaringly unusual element stuck in there with the hope that the reader will think, Gee, this place is really exotic! But instead readers ask, "Pink? Does that mean the chlorophyll is pink? Can chlorophyll be pink and still process sunlight? What's the adaptive significance of pink leaves? Do pink leaves change color in the fall?" And so on. Instead of being drawn into the story, readers are thrown completely off the page, fretting over an inane, over-the-top little "oh, wow" like that.
Fantasy writing, when done well, is as demanding as writing a historical novel, so it's well worth the effort to do it right. Never let yourself say, "Oh, it's just fantasy"—that way leads to poor writing and books worthy of the rejection slip.