Like MedicineZ0Z said, the difference between IM and FM is that IM is specifically focused on adult medicine while FM is more general and includes pediatric and obstetric training, so it's wrong to say you'll be a family physician whichever way you go--you may be a primary care physician but as an IM doctor you will not be seeing kids or pregnant women in clinic. The tradeoff is you will usually have an easier time getting inpatient (hospitalist) positions in larger cities and you retain the ability to subspecialize.
Historically the Northeast tends to have more of a focus of primary care being internists and pediatricians as opposed to family doctors (which is why there are like 30 IM programs in NYC but only about 6 FM ones), but there's nothing set in stone about this.
A primary care track IM program is one that gives you more time in the outpatient setting, usually by getting rid of some extra elective and ICU time. This can be good because many IM programs can be very inpatient heavy to the detriment of their clinic experience, meaning most of their grads don't feel as comfortable in primary care when compared to hospitalist medicine. Primary care IM is good if you have no interest in peds/OB, are considering subspecializing, or want to work in an urban area (where even FM doctors can be relegated to adults only).
The NYU community medicine track is sort of an in between track where you still do a pretty normal amount of inpatient/ICU but the clinic experience is fairly robust when compared to some other academic IM programs, and also has a focus on things that are important in urban primary care, like reproductive health, HIV treatment, and addiction medicine. They do all their outpatient didactics with the primary care track people too.