I'm 6 hours away form completing a bachelors in History, but I'm unsure as to where I should continue my education. How did you go about making this decision? My fear is that I would select a school and realize that the program doesn't cater to my areas of interest and I would be stuck researching topics for which I have no real passion. Can this be avoided?
For a master's, you should go wherever offers you the best financial deal.
For a PhD, you generally apply to work with a specific advisor, who WILL be someone in your projected field whose work you know and whose methodology/philosophy you generally agree with. Ideally, there will be at least one other faculty member in the department who works on your general area and era of interest in case something goes wrong with your advisor, and for another committee member, and more targeted classes.
You can start to make a list of potential advisors by looking at current scholarship on your proposed subject matter. Who are the scholars? Google them. Who teaches at a uni with a PhD program that offers full funding? That's your basic list. Then you can refine.
Also, you (generic) should not get a PhD in history. Not right now.
I'd wager that you are from the USA, at least that would be my guess based on the terminology used here? Most universities in my region - Western Europe - have their own unique focus. I did my master's at a university that focused on modern and contemporary urban history in combination with more experimental methodologies. There were obviously also some professors whose work fell outside of this focus, but they were a clear minority. While we obviously had a wide variety of courses to choose from, they mostly didn't encompass anything earlier than medieval times. Meanwhile, a university two cities over was mostly known for it's focus on ancient history, archeology and would also adopt more traditional methodologies.
While I obviously can't know how this relates to your specific experience, it's very similar in most universities I've visited or worked with. It's the nature of the beast that universities tend to be a bit more oriented towards specific topics or time periods. This is due to various reasons, the most obvious one being that the most prolific professors teaching at these universities have their own speciality to teach on and that this in turn helps gravitate both their former students as their peers to specific subjects or time periods. There's obviously also a regionally specific factor playing into this, with certain sources being more readily available to closeby universities.
I obviously can't speak on the cost factor. Most higher educations are almost free of cost where I live, so that was never a factor for me. I do think that it might be worth checking digging a bit further into the history department of the universities you are considering. Who teaches there? What's their speciality? What's the region specifically known for? I'd recon that this should be readily available information. The way it work in Western Europe is that your master's thesis is a small-scale doctorate, and they both work very much like /u/sunagainstgold described it. You will need to ask a professor to be your advisor/promotor, preferably someone who is an authority within the field of your projected research - or atleast someone who has done research related to your own thesis.
Where I live, you can ask a professor from a different university to be your sponsor. So even if your interests don't fully align with the university's speciality, you aren't exactly stuck. It's not exactly ideal though. Most students find that it helps to work with a professor who works closeby or someone with whom they already have some rapport. I'm not sure if this is how it works in the United States, you'd need someone else to confirm or deny that if you are in fact American. Regardless, I think that it's certainly worth to check out the history department of the universities you fancy, to see how they align with your current interests.
Keep in mind that your interests might develop through your studies though! I didn't exactly start my education interested in historiography.