DOs and MDs are doctors who can practice in any area of medicine. Many are primary care doctors, but both can specialize in other fields. Both can also prescribe medication and train to do surgery.
Both have 4 years of medical school. After that, MDs and DOs work as interns, residents, and, for some, as fellows in their chosen field for 3-8 more years.
DOs and MDs also have to pass state exams for a license to practice medicine. Both can practice medicine in all 50 states.