On the motherboard there are usually 2 very wide multi ribbon cables with 2 connectors on each, plus another cable one about half the width for the floppy drive.
The 2 wide ones connect to the Primary and Secondary IDE channels.
Each IDE channel can have a Master and a Slave drive attached.
You can connect up to 4 IDE devices ( hard drives, CD roms, DVD roms and CD/DVD writers etc ).
The usual arrangement is to have the hard drive/s on the Primary IDE channel and the CD/DVD drive/s on the Secondary IDE channel.
If you have 2 IDE devices on one channel you have to set the jumpers on each one so that one is the Master and the second one is the Slave.
If you only have the one device on a channel then it is set as a Master or with some hard drives as a Master without a Slave.
The hard drive usually has a pictorial diagram showing how it should be set for however you intend to use it
Edited to add :
Or like "K" says above