A standoff is a threaded separator of defined length used to raise one assembly above another. They are usually round or hex (for wrench tightening), often made of brass come in male-female or female-female forms.
In electronics they are frequently used to raise a printed-circuit board above a surface. Insulating standoffs keep two parts from touching each other, thereby preventing electrical shorts. When used to fasten cable connectors (i.e. D connectors) together, they are called jack screws.
In contrast, a spacer is an un threaded piece of tubing which lets the entire bolt pass through. Since they cannot be tightened, they are usually round
Brass hexagonal spacer with male screw / PCB standoff spacer.