The only one of these able to become a licensed pharmacist is the Pharm.D. If you want to be a pharmacist in any setting this is the degree you need. That takes a minimum of 6 years of college, at least 2 years of pre-pharmacy undergrad years and 4 years in Pharmacy (though there are some programs that squeeze the 4 years of pharmacy into 3 calendar years). Many people entering a professional pharmacy program do hold bachelor's degrees, so for them it would be 8 years total.
A Ph.D. is a research degree. In Pharmacy it can be in several different areas, and may be basic science research (e.g., medicinal chemistry), applied research (e.g, pharmaceutics) or clinical research (e.g., clinical pharmacy) or a combination of these areas. Pharmacology is a sub-field of pharmacy that studies drug action, and that may be basic or applied research. Some school include a deparment of pharmacology in their college of pharmacy and some don't. Some schools might include it in a different area, like in a college of medicine. If you want to make and develop new drugs and do not want to be a licensed pharmacist a Ph.D. is probably the way to go, in either a basic or applied research area. The Ph.D. typically takes 4-7 years BEYOND a bachelor's degree. You need to do original research and write a thesis/dissertation among other things to be awarded a Ph.D. However there is often funding and you may be paid to do a research assistantship and will usually get a tuition waiver.
A Master's degree is usually 2-3 years beyond a bachelor's degree and it is usually a research based degree in pharmacy (some places may have a non-thesis option Master's, depending on the area of study). It would be good if you want to try out a field and aren't certain that you would want to continue in the field. Often people who drop out of a Ph.D. program end up getting a "terminal Master's", even though that wasn't their original intent. You can do research with a research-based master's but you won't be at a principal investigator level like you could be with a Ph.D. - you will always be supervised by someone else, though you could be a research associate or lab manager, etc.