I am an undergraduate right now, looking to apply to Grad schools. I am just confused about the kinds of degrees offered by graduate schools. Some state they have a "M.S, M.S/PhD, and PhD" programs. I have read a lot that students who quit their Ph.D in between after realizing that the program is not for them can leave with a masters but is this available for (almost) any PhD program or just the M.S/Ph.D program? Does a university that simply states an offering of a "Ph.D" program also allow students who quit in between to leave with a masters?
My field (economics) in the US generally works the way you're describing - you can quit in the middle of your PhD and leave with your masters. At my program, once we completed some number of graduate credits (I think it was around 2.5 years worth) we simply filled out an application on the student management portal for a masters, and they awarded it. It was like five extra minutes of work, so I think all of my classmates did it. They called it an "incidental masters degree"
That said, PhD programs frown heavily on entering a PhD with the goal of leaving in the middle with a masters degree. They offer funding to PhD students with the goal of putting quality applicants on the job market, which masters students can't do. Conversely, students who enroll in a masters program not only aren't funded, they usually pay a lot in tuition.
It does make for a nice consolation prize for the few classmates I have who never finished though, since they at least come out of the program with a masters.
This varies, but in my experience (US/Canada, biology/math/statistics),
entering an "M.S." program assumes that you will want to complete the Master's degree and leave (for industry or a PhD program elsewhere).
in an "M.S./Ph.D." program you are initially enrolled for a Master's; if, toward the end of the Master's program, it looks like you are doing well and you want to continue on with a Ph.D. in the same program, you can do some paperwork (in my old institution this was called a "Master's bypass") and be automatically enrolled in a PhD, without writing your Master's thesis, defending it, re-applying for the PhD program, etc.. In this case your Master's work would typically be rolled into the first chapter (or two) of your Ph.D. thesis.
Under this option there would not be any stigma associated with stopping with a Master's degree; part of the intention of an M.S./Ph.D. program is precisely to allow students to decide whether they want to continue with a Ph.D.
This option may be limited to students who plan to continue with the same supervisor.
There may also be an option for students who want to go through the process of getting their Master's degree (written thesis, defense, etc.) and then start the Ph.D. program; not much difference except that you do have to do the write-up and defense, and you get to add a degree to your CV.
In programs with an M.S./Ph.D. program, entry into the Ph.D. program would typically be reserved for students who already had a Master's degree in the relevant field.
Many schools will "offer" a terminal master's; this is a consolation prize for students who enrolled in a Ph.D. program but for some reason are unable to complete it (e.g. they are performing so poorly that they are being kicked out of the program, but well enough that some level of certification of achievement seems appropriate, or because they decided they were unhappy). "Terminal" means that such students would not typically be eligible to apply for a Ph.D. in the same program.
At most programs that offer both MS and PhD degrees, whether or not they have a formal MS/PhD track, it is usually pretty easy to get accepted into the PhD program if you do well in a Master's degree.
As may be clear from all of the above, these programs are usually flexible; if you started a "Ph.D. only" program and decided to drop out, you might have the option to write up your work and finish with a Master's. The M.S./Ph.D. is somewhat less stressful as it gives an explicit choice point.