A locality survey generally involves a study of the place your ancestors lived, it's history, geography, jurisdictions, and so forth. Each time I undertake a new research project, I do a little homework. Studying pertinent reference books, maps, and histories facilitates productive research. Facts learned through studying shape the course of research and put the ancestor in a context, showing that he was a real person in the real world.
National, state, city and county histories can all be useful for study. A study of national and state history will acquaint you with the years of common migration and national routes, information on wars, and a history of transportation. Knowing where and when the railroad was extended is certainly of interest as that greatly affected the population. Local histories are more useful for getting to know the people of a particular area. Stories about pioneer settlers are usually abundant in county histories. The story of a county's settlement is often helpful as well, especially if it was inhabited by, for example, a group of Quakers, a company of miners or a bunch of Irish Immigrants. If an ancestor lived among any of these groups, the course of research would inevitably be affected. County histories also often give accounts of the residents who fought in various wars and sometimes information on their regiments.
Maps and gazetteers are valuable to genealogists and provide information that may not be mentioned in any other record. Many types of maps exist, but for a preliminary survey, road and topographical maps are most useful. Also, it's best to find a map that was created close to the time period of the ancestor's residence there. The settlements have certainly changed over the years, even if the topography has not. The location of a mountain range or a river certainly affected the course of migration, and therefore affects the research. The location of nearby towns and their relative size is useful. An ancestor may have lived in a small village near a larger town, where they might have done business or married. Gazetteers provide information that maps do not, including information on a town's population, primary industry, or established churches.
The last step in the locality survey is to discover the records that survive and their location. The Handybook for Genealogists, Ancestry's Redbook, and the LDS Research Outlines, found at Family History Centers, are all useful for providing this information. Local libraries and genealogical societies will, of course, know about available local records. Never forget, however, that records are kept at every level including state and national.
Research is a lot less frustrating if the background information is all out on the table from the beginning. After doing a locality survey, the pedigree looks a lot less daunting. Seeing a date on the pedigree will say to you, "Yes, probate records survive for that town and they are available at the library", or "No, he probably wasn't married that year because of such and such". Simply put, a short study of history and geography will guide the research and make your time at the record repositories more productive. Investing a couple of hours in a locality survey will spare a lot of frustration and time down the research road.