Skipping school and getting caught is not a good thing and eventually you will get caught by either a regular police officer or a truancy officer and the results are not good.
If you think going to school is boring you'll think school is fun when you get locked up in Juvenile detention center for up to 90 days for skipping school.
Yes not going to school at all is illegal and can land the child in Juvenile Detention and land the parents in jail as well for up to 90 days.
I know from experience because when I was a kid I used to act like I was walking to school but I never showed up at all for a week.
I just ran around the town and hid out until the school day was over.
Eventually after a week of being absent I was caught by the police when they were out looking for me and I was taken into custody and put in Juvenile Detention for 90 days where I had to do my schoolwork there until I was finally released.
After that I started going to school like I was supposed too because although school can be boring the Juvenile Detention Center was even more boring being locked up and not being able to leave at all.
My parents also went to jail for 90 days so yes it's illegal to not go to school so if you're a child thinking of skipping out on school then do not do it as it can get you in trouble and your parents in trouble.
If you're a parent you need to force your kid to school no matter what it takes as long as it's within reason and not abuse.