Very simple. You send required docs (see the list on IRN), get into the line, and at some point yr process starts moving and IRN sends requests to “external agencies” including AIMA. AIMA replies to IRN if you are fine with residence requirements (which are 5 yrs for the date of application and is resident at the moment of reply). If AIMA’s reply is negative you get first preliminary refusal with explanation, and if you could not solve the problem fast or explain how it happened and receive more time, you get the final refusal.