In the basic system with one hard drive, make sure the jumper on the back is set to "master". This is usually labeled on the drive itself. Many drives have a setting for "single" or "cable select". You can choose this too. This setting tells the drive it is alone on that particular IDE channel, and it works the same as a master. In a one HDD system, use this setting if available.
CD-ROM's are very simple to configure. Their jumpers are located in different places on each drive, and are labeled differently, but they are easily found in most cases. Most systems only have one CD-ROM. So, configure this CD-ROM as a master. It is best to have this CD-ROM alone on the second IDE channel of your motherboard. Jumpers can be set with a pair of needle-nosed pliers or tweezers. Many are capable of grabbing the jumper with their fingers or nails. This is fine, too.
In general, have hard drives on a separate channel than the CD drives. If you have a second hard drive, set it as slave on IDE 1. Likewise, if you have a second CD drive, such as a CD-RW drive or a DVD, then install it as a slave on IDE 2. Keep in mind you can use a CD-RW or a DVD drive as a CD-ROM drive, although it won't be as fast.
If a particular drive does not need to be jumpered at all, it is best to hang the jumper over one pin. This is the same as being unjumpered, but make sure the jumper is there for future use if needed.