Pharm.D. is a professional doctorate degree in pharmacy and stands for Doctor of Pharmacy, while RPh represents a registered pharmacist with a license to practice pharmacy. A Pharm.D. degree is a prerequisite to be licensed to practice as a pharmacist.
According to Wikipedia, to be admitted to pharmacy school you must first obtain a bachelor's degree, which can range from three years to four years. According to About.com Health Careers, an entry exam is required for most pharmacy schools, typically in the form of the Pharmacy College Admission Test, or the PCAT. Completion of at least 90 credit hours of mathematics, sciences, composition, and humanities at an accredited university is also required to gain entry into a Pharm.D. program. Some institutions still offer a six-year accelerated program that combines undergraduate coursework with the Pharm.D. degree, but this is highly controversial as this may not be a long enough period to adequately fulfill doctorate and undergraduate requirements simultaneously.