The 2 IDE sockets on your motherboard will look something like this.
http://techreport.com/reviews/2002q1/tyan-trin ity510/ide.jpg
It may not be totally clear which is IDE0 and which is IDE1.
You connect your devices with an IDE cable (so you need two of them), see here
http://www.tsvc.com.au/files/t_45649.gif
Note it has 3 connectors, one each end and one in the middle.
One end attaches to the motherboard, the MIDDLE socket to the SLAVE, the other end to the MASTER.
Note you will also need to connect POWER to each of these four devices.
There SHOULD be enough power sockets inside your PC case, but maybe not so you might need a splitter.
You also need to make sure that your PC case can take 4 devices.
The hard disks can be "hidden" inside the case but both CD drives will need an external outlet for the CD drawers.