Obtain your bachelor's degree. Your degree should preferably be in history, but many students have gone on to pursue a Ph.D. in history with a bachelor's degree in another field. For instance, someone with a degree in biblical studies could easily transition to a Ph.D. in ancient history.
Research graduate schools to find one that best meets your scholarly interests. You need to have an intended field of specialization in mind when you begin applying to schools, although you may not have to declare your specialization until midway through your graduate program. There are many different fields of history such as ancient history, American history, eastern civilization, western civilization, African history, women's history, and even areas like social and intellectual history. Ideally, you should find a scholar who conducts research in the field you intend to specialize in, so that you can work closely with her and allow her to help guide you with your research.
Apply to the graduate schools of your choosing. Most graduate programs will require that you take the Graduate Record Examination (GRE) and submit a personal statement or statement of intent as part of the application process. The GRE is the standardized test that most graduate schools use in conjunction with the rest of the application to determine which applicants to admit. Your personal statement should highlight your research interests since the Ph.D. is a research degree. If your intent is to teach, you can do that with a master's degree at a community college. Most universities will not care about your desire to teach when you apply to their program. They will want to hear about your research interests and how you will be a good fit for their department.
Complete your coursework and pass your comprehensive examinations. Most Ph.D. programs in history will require various reading and research seminars. In all, it can take about two to three years to complete these requirements. You will be expected to complete a reading list which contains a list of required books and articles that you must know for your comprehensive exams. These exams are usually taken over the course of several days and consist of several long writing sessions, and possibly an oral examination.
Write your dissertation. Your dissertation is an original piece of research that must make a contribution to the scholarly field in which you are pursuing your degree. These sometimes take several years to complete. The dissertation will have to be approved by your dissertation committee before you can receive your degree.