This will be a short article! The Lenz-JST decoder has a lot of capabilities, but in the SW-9/NW-2 all you really need to do is set the address, normally to the Loco Road Number. The other things you may want to do are to change the directional lighting, or to turn off analog mode.
The Gold-JST decoder comes with a default address of 3. Once I've plugged the decoder into the loco and tested it, I like to set the address to match the Road Number of my loco. In the casew of my Maine Central SW-9, that's 335. You can choose any number from 2-9999, but I always avoid 3 and 4 as I use them for special purposes.
To set the address on the SW-9/NW-2 (using the Lenz LH100), place it on the programming track.