These books offer guidance through the research and writing process. They cover the methods and sources used by historians including how to work with primary sources. Consider all Routledge Guides to Using Historical Sources titles.
Reading, Writing, and Researching for History: A Guide for College Students (c. 1998) is aimed at undergraduates. It "addresses all aspect of historical research and writing" including how to appropriately engage with primary documents and secondary sources. The books listed below, though published a little while ago, continue to offer sound advice.