A suicide car bomber killed at least 24 people in an attack on a busy market in a town north of Baghdad on Tuesday, officials said.