I had a scratchy volume knob on my Sterling by Music Man Silo3 guitar for some time now and I finally got around to replacing it.
First check that the scratchiness is not coming from buildup in the potentiometer itself - try spraying the inside of the pot with Deoxit and see if it goes away.
Make sure you pick the right component: a 250k or 500k ohm potentiometer. It doesn't matter too much, but for volume it's better to have a logarithmic taper pot and for tone it's better to have a linear taper pot. For me this Ernie Ball part (linear taper) worked well.
It's a voltage divider. The signal coming from the pickup is divided. Don't ask me for circuit analysis though, that's some EE magic.
Typically black indicates ground and red indicates some positive constant DC voltage. That was not the case for me, but use colour codes where you can.
It was fairly straightforward for me to desolder and solder terminal by terminal. If you can't do that, I would suggest rubber bands or twist ties to keep track of which bundle of wires was connected to which terminal.
You may have to wack up the temp on your soldering iron to desolder. I had to go to ~450 celsius.