First while I upset many people with this, ADHD is a throw any kid into it, that has any issues that are often caused by diet or just poor parenting by allowing bad behavior at home.
Sometimes kids who are smarter than other kids or quicker than others get bored in normal school and as such, they appear not to listen, or let their minds wonder. the other issue, some may be far advanced in math or science, but lack skills in other areas, making moving them ahead in schools hard.
You can look into advanced testing to find their level and perhaps consider a private school where they can be taught to their abilitity