They are both very different disciplines. The job market is very different for both. You can do a doctorate in either field, although a DrPH is more fitting for someone in CH whereas a PhD is more fitting for someone in epi. Keep in mind, the two doctoral degrees are also pretty different for people with different goals.
From Wikipedia:
Community health, a field within
public health, is a discipline that concerns itself with the study and betterment of the health characteristics of biological communities. While the term
community can be broadly defined, community health tends to focus on geographic areas rather than people with shared characteristics.
Epidemiology is the study of factors affecting the
health and
illness of populations, and serves as the foundation and
logic of interventions made in the interest of
public health and
preventive medicine. It is considered a cornerstone methodology of public health research, and is highly regarded in
evidence-based medicine for identifying risk factors for
disease and determining optimal treatment approaches to clinical practice. In the study of communicable and non-communicable diseases, the work of epidemiologists ranges from
outbreak investigation to study design, data collection and analysis including the development of statistical models to test hypotheses and the documentation of results for submission to peer-reviewed journals.