Hey Likhesh,
So basically, Coke is produced by heating coal in the absence of air. Coke is cheap and provides both the reducing agent for the reaction and also the heat source.
If you want more details, visit this link. I found it quite helpful.
https://chem.libretexts.org/Core/Inorganic_Chemistry/Descriptive_Chemistry/Elements_Organized_by_Block/3_d-Block_Elements/1b_Properties_of_Transition_Metals/Metallurgy/The_Extraction_of_Iron
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile