They do 'just get it' [old person alert] [no SEN experience] eventually. Bladder and bowel control involves a fairly complicated signalling chain of proteins and hormones. Developing little bodies set these up at different stages, dependent on genetics as much as anything else. They may often develop in separate steps, rather than all at once, so some kids, for example, know they need to pee but don't yet release the proteins which prompt the co-ordinated squeeze/relax actions on command.
In the vast majority of children this will happen as genetically programmed, some time between the ages of two and five. It's wise to do the training anyway, so your kid already knows what to do when their body catches on. I don't know what's advised nowadays, but we always used to take the child to the potty or toilet before going out, before bed and after meals, etc. If nothing happens within a couple of minutes it's no big deal, but we're trying to set up a learned response to signals we know they will get, even though the kid doesn't yet know what we're on about 😏
I always used to respond immediately to "I need to wee" even if that meant holding the poor little bugger over a street drain. I think recognition of the need should never be thwarted - again, because we want the correct signalling to feel natural even if the hold/release thing isn't working yet.
I never encountered a child who refused to come out of nappies, though I've often heard about it since. I wonder if the PP may have a point about terry nappies: they are nothing like as comfortable or comforting as a nice, snug pair of padded pants! That's just me wondering, though; it must have happened to some kids. The main thing is to ensure there is no sense of shame or anxiety while waiting for the mysteries of interoception to work their magic.