Internal medicine is basically adult medicine, with the option to subspecialize, if desired. Family medicine is geared towards primary care of adults and children, and also encompasses obstetrics. There are no options for specialization aside from a handful of fellowships. Both residencies are three years in length.
From a practice standpoint, ambulatory general internal medicine practices tend to consist primarily of older adults with chronic medical problems. In many cases, these patients are older than 65 years of age and covered by Medicare. In family medicine, you still get plenty of this, but you also tend to do a fair amount of primary prevention (physicals, well-woman exams, well-child checks, etc.) as well as acute care for younger patients, who frequently have better-reimbursing insurance coverage compared to Medicare. Because of higher reimbursement for more complex office visits, however, income potential is very similar. There's lots of room for variation between individual practices, however.
Some people who wish to take care of both children and adults choose to pursue combined training in internal medicine and pediatrics (med-peds.)