Sorry i'm new to this HDB/Property stuff so please excuse my questions

Background info - I'm a new PR, employed, got CPF contribution. My wife, SC, self employed.
How exactly these grants work - first timers, cpf grant, enhanced cpf grant etc? I heard they will credit that to our OA account. Then in that case, HDB will deduct that grant from the approved loan amount? if not when/how exactly they will utilize these grants?
We are planning to get our resale flat and i'd like to know how this thing works.
Thanks

Kev