The process of the injection (I'm asssuming you mean IV) is just a matter of 30 minutes to an hour, there are different iron solutions, if it's your first time it might be a bit slower since there is a tiny tiny tiny chance of a an adverse reaction, which means they slow it down a bit. (nothing to worry about, just explaining why it takes so long).
If you're asking how long it takes before you see any benefit, if the issue was your iron levels, you'll feel better a few hours after the IV or even right after the IV, it's a big kick of energy that lasts the evening, you tend to have too much energy after an iron IV, especially if they add glucose IV on top of it.
How long an iron IV lasts and keeps your iron levels up again depends on the solution, i.e. brand, there are newer brands that use a different release formula, but it's a few weeks usually. If you iron drops yet again after those few weeks, they might administer iron again and try to find the cause behind the iron shortage.