One nut up against t’other, the last nut on is the “ locknut “I'm not exactly sure if they are the same thing - basically one nut tightened against another, rather than a single special type of nut.
The problem is that the nut I want to shift is on very tight on the axle. Axles by design spin freely, so I need to stop it turning while I undo the nut. A jam nut (or locknut?) is the only way I can think of that won't damage the thread on the axle. I could hold the other end in a vice or with mole grips but the thread would no doubt pay the price.
Try two spanners, one on the locknut, one on the nut it is locking and tighten them against each other “ effing tight” ( this means the front nut is actually being turned in the loosening direction to bind it against the locknut)