Rudderrat got a great explanation, well said.
If I could add just a couple of points:
Modern IRS's sense the earth's rotational velocity during alignment; therefore, it knows what latitude it is at. Inserting present position during alignment tells the unit whether it is in the northern hemisphere or southern hemisphere.
Once the unit is in nav, it switches to "position keeping" rather than "position finding"- it knew where it was when it was aligned and keeps track of where its going.
How the IRS is mounted in its rack can have a tremendous impact on drift rate. Even the slightest tilt makes a huge difference. A unit that has more than average drift prior to blocking out may need to be re-racked.
Best,
GC