In the European Union, you need to be at least 15 to work, while in Hungary, you are required to attend education at least until the age of 16. Accordingly, you can work besides school from the age of 15 with the permission of your parents, and from 16 on your own. Students usually work not directly for employers but through student organizations as it is a cost-effective option for all parties.
Minors moving to Hungary usually get a residence permit based on family unification, as a dependent of one of their parents – even if they are of a working age. You can retain your Hungarian residency based on family unification until the age of 18. After that, you will need to switch to another type of residence permit if you wish to continue to reside in Hungary. It can be a study permit if you continue your studies at a Hungarian university or college, a work permit if you find a job, or a gainful activity permit if you start your own business.