I ‘Think’ (don’t quote me as I am not a parent)...
Arrive, register with Social Security, Tax office, TOWN HALL - EMPADRONMENTO (like a local sensus register)
Then go to the local school and register?
You can always ask at your local town hall as most (on the coast at least), have a Foreigners Department and will assist with info such as this.