Transistors overheating

2N3906's are not suitable for driving a motor unless its a tiny tiny one. A medium power rated transistor is probably called for, rated at 1 to 2A and a gain of 100 or more. These tend to come in a TO220 package or similar to which you can bolt a small heatsink if necessary.

Alternatively a power MOSFET with logic-level drive would do the job nicely.

And don't forget that protection diode.