Switch is a single pole, dual throw (SPDT); typically the centre is common, and the two outer pins connect to the common, individually in each position.

The single pole, single throw (SPST) will only have two pins.

Either will work if only two wires are connected.