If your tub spout is the screw-on type, it has to be threaded on both ends and be a specific length based on your type of tub spout. If it is the slide-on type with a set screw, it only has to be threaded on the wall end and long enough to fit the spout on properly.
Use 2-3 flat wraps of teflon tape on all male threads wrapped clockwise only as the threaded end faces you.
Remove the old one that your spout is on, and take it to any plumbing supply place. You should be able to get something that matches it.
Good Luck!
Mike