If you apply to Preventive Medicine residencies after graduating from medical school, and you already hold a MPH degree, then the residency will be 2 years (intern year and the practitum year), instead of the usual 3 years for those who do not have an MPH. So as a 4th year medical student, you would apply through ERAS and the NRMP match to any primary care PGY-1 spot (FM, IM or transitional). Then during your PGY-1 year, you would apply again to Preventive Medicine residencies through ERAS or independently (some do not accept ERAS applications).
This is off-course assuming you hold an accredited MPH degree from a U.S. public health school.
If you are a MD/MPH U.S. medical graduate, and interested in Preventive Medicine, then it might be better (and easier) to apply to combined FM/PM or IM/PM residency programs. The reason is that it will save you energy since you only have to apply once through ERAS and the NRMP match during your 4th medical school year, rather than apply 2 seperate times. The downside is that you will be doing a FM or IM residency inaddition to the Preventive Medicine practicum year.
NOTE: The one year (intern) requirement to get into Preventive Medicine residency is an absolute MINIMUM. Many Preventive Medicine residencies "prefer" (in other words require) applicants to complete a full primary care residency BEFORE they apply to their Preventive Medicine residency program.
NOTE: If you are a FMG or IMG then this arrangement (2 year residency for Preventive Medicine) might not work. Most State medical licensing boards require that FMGs and IMGs to complete 3 years of residency before they can be eligible for a medical license. If you are a FMG or IMG, the combined FM/PM or IM/PM is the best option (and depending on your state it might be the only option).