Read about the time you're writing about. There are many books about the American Civil War, for example, or post-World War I United States. Reading books dedicated to the time period you're researching will help lend your fiction an air of authenticity. In 1943, due to the war efforts and the shortage of copper, pennies were made from zinc-covered steel. Introducing this fact into your prose will help transport your reader into the era you're using as the background of your story.
Research words that were used in the time period you're writing about. The word OK (or okay) wasn't widely used before 1839, but by 1840 it had started to spread across the United States. Today, the word is used universally in many different cultures to signify that things are indeed "all right." If you're writing about the pilgrims landing on Plymouth Rock in 1620, it's a sure bet that, when asked how the voyage went, not one of them responded with "OK."
Read biographies of any historical figures that you might want to include in your fiction. It might help immerse your readers in the fictional world that you've set in 1870 to have your protagonist bump into Mark Twain while traveling through Missouri, but in fact that would be impossible as Twain was living in Buffalo, New York, at the time. Paying attention to small details will help enrich your fiction, just as ignoring them can hurt it.
Talk to people who lived through the time period in question. If you're setting your story in 14th-century Italy, then obviously that's not possible. A novel set in 1967 Arkansas, however, may benefit greatly from interviewing people who lived there at the time. Uncle George or Aunt Mary may recall intimate details about your setting that were never recorded in print, such as where boys in high school took their girlfriends for dates on Saturday night.
Focus on the details. Facts are important, but so are intangibles such as the smell of the soap factory or the taste of a freshly opened bottle of Coke. People often ate different foods and enjoyed different hobbies in 1892 than they do in modern times. If you know that, in 1865, Pears Soap had a mild spicy scent instead of the frankincense scent we now associate with the soap, you'll move one step closer toward immersing your audience in your fiction.