The difference is that pediatricians solely specialize in the treatment of children, while family medicine doctors specialize in treating patients of all ages.