At most universities, completion of a master's degree requires two to three years of coursework and exams. Some programs (particularly in the science fields) require that the master's candidate complete a thesis, reporting a research project that the student has conceptualized and investigated.
The thesis project is conducted under the supervision of a major professor, and must be presented to a thesis committee, consisting of several faculty members from the student's academic department (and occasionally, outside members, if the research topic engages multiple disciplines).
The doctorate requires 4-7 years of study, incorporating 2-3 years of coursework and a least a year to complete the dissertation. Dissertation research is usually far more independent than thesis research, but again, the work is completed under the supervision of a major professor, and must be proposed, and later defended in front of a dissertation committee.
Many doctoral programs require the PhD candidate to spend at least a year engaged in intensive reading, in preparation for a lengthy and challenging examination, which may include both written and oral questioning. The exam itself is often referred to as the "Comprehensive Exam". Passing the comprehensive is often a prerequisite to being granted approval to begin the dissertation research.
Unlike other papers and exams, there is no particular guarantee that a PhD student will satisfy his/her committee with "good work" - it is not at all uncommon for a dissertation committee to reject all or part of the research proposal and all or part of the final dissertation, once presented. It is also not uncommon for a candidate to be sent back to better prepare for another shot at the comprehensive exam.
There really shouldn't be much confusion about the difference between the two; The master's is primarily a program of advanced coursework (which may or may not include a research requirement), while the PhD is primarily a program of advanced research.
As some of the other respondents have explained, there are many schools that do not offer doctoral degrees, as a proper PhD program would require the availability of advanced laboratory and research facilities.
Many universities offer doctoral degrees in some departments and not in others - for example, a particular state university might have a PhD program in Computer Science and Psychology, but not in History or Mathematics.
Among schools that DO offer a doctoral degree, most do not allow students to opt between a master's program or a PhD program. These schools offer a PhD program, and they're not interested in admitting students who aren't there to earn the doctorate. (This is not universal, there are schools that do offer the option).
Some of the schools that will only accept students for the PhD program will nonetheless "award" the master's when the student has completed the required coursework (and if necessary, the thesis). I guess these programs kind of see the Master's as a "waypoint" that a doctoral candidate can use to measure his/her progress towards the terminal PhD.
Many doctorate holders will list the Master's as an earned degree on their curriculum vitae (resume), regardless of whether or not the school actually awarded them a separate degree.
The particular program that I attended was a doctorate-admission only program that acknowledged the completion of the master's level requirements, and officially designated its students as M.A. or M.S. recipients in university correspondence. Again, it was probably mostly to signify that we were advanced students, and that we had completed the thesis requirement.
There are a few general rules of thumb about master's and PhD program...
Master's programs are generally less prestigious and USUALLY less well-funded as far as financial aid to the students. PhD programs often provide significant scholarships, grants and stipends in exchange for research and teaching responsibilities.
Master's only programs tend to be offered at institutions with less advanced research and technological opportunities available to the students.
Whether an individual student should pursue a PhD, or just a master's really depends on the interests and capabilities of the student AND the demands of employers in the field of interest. If research is not your "thing", then a PhD is probably not for you - if nothing else, a PhD is a 4-7 research training and research performance degree that trains you to....you guessed it...do research.
If the field that interests you is a research field at heart (mathematics, chemistry, psychology, etc.), then employers will probably demand a PhD. If the field that interests you rewards employees with advanced training (primary and secondary school teaching, accounting, nursing, etc.), then you're probably looking at a field that doesn't require more than a Master's degree.
If you want to prepare other graduate students at a institution of higher learning, then you, like most (if not all) of your professors will need to have a PhD, and you will devote your professional career to both teaching and research.
I hope all that helped clear up the confusion. Good luck to you!