Major in anything that floats your boat while you complete the pre-med requirements (Bio I and II, Chem I and II, Organic Chem I and II, Physics and I and II, English composition... some schools have some additional requirements....) Spread these over the first 2-3 years of college. It usually takes 4 years to complete a college degree. BA or BS-- doesn't matter.
When you apply to medical school, you will be applying to study all of medicine, not just gyncology and obstetrics. Medical School takes 4 years.
In the last year of medical school you will apply to be selected for a residency. At that point you will be applying for a residency in Obstetrics and Gynecology, or Family medicine, or Internal Medicine, or Surgery, etc. (Some people who think they will like OB-GYN decide they hate it when they do it for 12 weeks during the third year of medical school) I think a residency in OB-GYN is 4 years and maybe someeone else can chime in and confirm if this is true. There is further subspecialty training available including gynecologic oncology, maternal-fetal medicine, family planning, etc. Those are another 2 years or more.