I wanted to create a switch mechanism, using a three position switch that would allow me to change the speed of the motor in the picture. I know that the motor's speed can be changed by switching the ground wire from low to high but how would I use a switch to make this switch, electronically, instead of manually?
When you say you want to use a three position switch, do you mean a switch that has high, low and off positions? If so, you need a double-pole, double-throw switch with an off position. You would wire the switch as shown below assuming the off position is in the center. I believe that a switch with the off position on one end may be more difficult to find. Disconnecting the grounded power line will shut the motor off, but it is not good practice to switch anything off that way. You should not exchange the connections of the hot and grounded power lines.