Learning about the nervous system - dysregulation and polyvagal theory.
Learning about sensory integration tools to help with above.
Getting my own ADHD identified and treated.
I can't really explain it all in a single comment but essentially the nervous system is the whole key to everything IME - they will slide between different states. We all do as humans but children aren't yet good at self-regulation, so they are dysregulated a lot, like toddlers having tantrums or a 5yo saying "I am going to put you in the bin" or ripping up their drawing because it's not good enough or a 9yo slamming doors and saying "I hate you". Whining, wheedling, flopping and sighing and "I can't do it" and "play with me" and "I'm boooored". Basically any of this silly/annoying behaviour where they really know better but they are doing it because they are in a foul mood and have no better coping skills yet. It's normal. Adults get dysregulated too - being snappy, irritable, etc but maybe in more subtle ways like finding it difficult to concentrate or feeling restless. Ideally, we notice when this is happening and take steps to self-regulate - we might do this consciously e.g. go for a walk, have a smoke, cup of coffee, rant to a friend etc, or we might not really think about it but just recognise that we feel better for having a chat etc.
ND children spend much more time in a dysregulated state, they find it much harder to self-regulate, and the signs they are dysregulated might be different, for example, an ADHD child might go into a very "hyper" or silly, almost manic-seeming mood where they are like a whirlwind shrieking and making a mess, annoying people on purpose, etc. I am just starting really learning about autism but know less about it, but you might see more stimming or stress behaviours when an autistic child is dysregulated or you might find that they are less able to respond to social cues or might even seem to have less language. I think this explains a lot of the confusion that many people have around ND children because we see them doing something one time or sometimes (when they are regulated) and then wonder why they can't do that at another time (when they are dysregulated). It is even sometimes used as kind of "proof" that they "could do it if they wanted to" which - once you understand regulation/dysregulation, it all makes a lot more sense and you can see that they genuinely can't.
Regulated does not necessarily mean happy or calm. You can be angry and regulated - think about a politician, championing a worthy cause, or the kind of teacher that everyone respects and nobody wants to cross, but who is meticulously fair. You can be active and regulated - think about someone playing sport, or acting in a play. Regulation is about being in control of your body and your reactions, whereas dysregulation is not really being in control - it might be too much energy for the situation so somebody is chaotic and uncontrolled, or too little energy for the situation e.g. a child struggling to focus in class and falling asleep.
Push dysregulation too far and you'll get fight or flight, which is what meltdowns are. We associate fight or flight with terrifying, life-threatening situations because for most NT adults that's when we experience it. But ND children may well be pushed into this state much more often. That's why a meltdown is not a tantrum, it is not a behaviour, it is not manipulative/to get what they want. It's where their nervous system is so overloaded that it has essentially triggered an ancient survival mechanism which makes them react as though their life is in danger.
The sensory piece of the puzzle is key because while sensory is not the whole picture, it can be a huge part of the picture and is an often overlooked one. Any sensations they are more sensitive to will build up and add to dysregulation, so learning their sensory sensitivities and building in strategies to reduce the impact of these can help. And then it also helps because sensory input, particularly movement for ADHD children, or any sensory input they find regulating for autistic children, can help them self-regulate and come back to a more controlled baseline. In fact, stimming is often a form of sensory self-regulation, so be careful if you're ever looking to discourage any type of stimming (even one which is harmful) - you should be aware that by doing so you're removing a self-regulatory tool so you should be looking to either replace it or perhaps reduce overall stress, rather than address the stress behaviour.
I think Stuart Shanker's Self-Reg is probably the most comprehensive source of info on this but he is very rambly. If you want a quicker getting started guide I prefer Conscious Discipline or The OT Butterfly.