The end of the IDE cable with the single connector is plugged into the motherboard. The end with 2 connectors is where the drive(s) are placed.
The first thing to do with the drives is set the jumpers correctly. If it is a single drive it can be set as the master, this will then be plugged into the end connector. If you have 2 drives the master is set in the same way, the second drive must have its jumper configuration set to slave and is then plugged in on the inner of the 2 connectors.
The main drive with the operating system installed is normally chosen as the master, with the slave drive offering additional storage or operating as a backup.
Later IDE drives also support cable select, where the master and slave drive are chosen by their position on the cable. In order for this to work you need a compatible cable and to set both drive’s jumpers to “cable select”.
When plugging in the cable the red line on it can be used to make sure it is the right way round. The line corresponds to pin 1 and on IDE hard drives this plugs into the side nearest the power connector.