If you are applying an anti-corrosive coating of Zinc, Aluminium or one of their alloys to a substrate, the surface would need to be clean and dry and then grit-blasted. If an engineering coating is being applied, the component should be de-greased and pre-machined normally by turning a rough thread.
If the component has been in service and/or running in oil, pre-heating the component to between 260°C and 370°C and maintaining this temperature until oil ceases to come to the surface (or until all smoking stops) will satisfactorily clean the component.