The absorption of heme iron (from meat and animal products) isn't generally affected by diet; however, your body's absorption of non-heme iron (from plant sources) can vary depending on other items you eat or drink.1
For example, orange juice or other foods that contain vitamin C can help your body absorb non-heme iron more easily if they're eaten at the same time. On the other hand, coffee, tea and a variety of other items can reduce the amount of iron your body is able to absorb.2,3
Other foods that inhibit iron absorption include:4
As you can see, many of these foods are still good for you. The idea isn't to cut them out of your diet; just remember to eat them at times when they won't affect the rest of the iron content in your meals.
1 Finch CA, Cook JD. Iron deficiency. Am J Clin Nutr. 1984;39(3):471-477.
2 Cook JD, Reddy MB. Effect of ascorbic acid intake on nonheme-iron absorption from a complete diet. Am J Clin Nutr. 2001;73(1):93-98.
3 Cook JD, Dassenko SA, Whittaker P. Calcium supplementation: effect on iron absorption. Am J Clin Nutr. 1991;53(1):106-111.
4 Morck TA, Lynch SR, Cook JD. Inhibition of food iron absorption by coffee. Am J Clin Nutr. 1983;37(3):416-420.