When a child refuses to go to school you should first sit them down and talk to them calmly about it.
Ask the child why they are refusing to go to school and see if there's something going wrong in school that is making the child refuse to attend school.
Maybe the child is being bullied, made fun of or is having a hard time learning.
Ask the child if they are being bullied and find out why they are not wanting to go to school.
If it's just because they don't want to go to school then you have to literally drag them to school or wait a day and then say okay you can stay home but the next day you have to go to school.
You have to make it so the child is not having any fun at home and make it really boring for the child to stay at home.
Make the child do chores, stay in their room and make them stay inside the house all day.
When my kid refused to go to school I made him stay home and stay inside the house without watching TV, using the computer and didn't allow him to play with any toys.
I made it boring for him and so he decided to go to school the next day.