Do you have to eat with iron pills?

Do they make your stomach hurt ?