NEM 652 8-pin plugs are very common in OO models. They are very simple, with colour-coded wires to help get them the
right way around, and even if you do plug them in the wrong way, it won't cause any damage!
Simply plug your decoder's 8-pin plug straight into the loco's 8-pin decoder socket (removing any blanking plate first).
If your loco runs backwards when you expect it to run forwards, or the lights of your loco (where fitted) do no operate, then
simply switch the plug around, spinning it through 180' and try again.
The orange wire will be attached to 'pin 1', which is often marked on the socket so you can identify which is the
correct way around.
Then you just need to figure out where the decoder will fit inside the loco's body shell!