You are right - pin #8 on the L293 IC is for powering the motors. Those chips work like this - if you have enabled the specific "terminal" (1,2EN or 3,4 EN is high) and if you provide +5v to an A pin (1A, 2A, 3A, 4A) then current will flow from pin 8 to the respective Y terminal.
An example - 1,2EN is high, 1A is high, then 1Y will be providing power. If you put 1Y high and 2Y low then the current will flow from 1Y to 2Y and the motor (if it's simple brushed DC) will turn in one direction. Doing the opposite - 2Y high, 1Y low - will turn the motor the other direction.
There is a severe limitation to how much current can flow through this chip - it is stated somewhere in the datasheet, but usually you can safely drive something small, without overheating and blowing it up.