The Starter solenoid is mounted on top (on the side when installed) of the starter motor. There are 2 terminals (studs and nuts) on the starter solenoid and one connector (single wire connector).-the single wire connector is the one that energizes the solenoid which will do 2 things - 1) engage (extend) the pinion gear of the starter to the flywheel; 2) close internal contacts to connect battery power to the starter motor.-one terminal of the starter solenoid is connected to the battery (HOT side).-the other terminal is connected to the starter motor winding (switched side)-the chassis of the starter serves as the ground connection when it is bolted to the engine. So anytime the starter is bolted to the engine, it is grounded and therefore connected to the negative side of the battery.
When you apply battery voltage to the single wire connector, the starter solenoid should energize and you should hear it engaging against the flywheel.
When you apply power directly to the Switched terminal (going to the starter motor) the starter motor should turn (but it will not crank the engine since the pinion gear did not engage the flywheel.
You may have a defective (or sticky) starter solenoid since you said that the starter spins when you apply power directly to the motor. Again, the best way to check if you are getting the START SIGNAL is to check for battery voltage on the SINGLE-WIRE connector while the car is being started.
Refer to the attached link for the FSM (Factory Service Manual for the 99 I30. Start on page EL-25 for description and EL-26 for the wiring diagram (M/T).
http://www.nicoclub.com/FSM/i30/1999/el.pdf