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 aluminum, brass, or nylon, and 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 unthreaded piece of tubing which lets the entire bolt pass through. Since they cannot be tightened, they are usually round.

Above info is from the reference.