Are you talking about an Alesis drum machine (eg SR-16)? If so, and it has headphones output, then you need a stereo 1/4" plug to two RCA out cable (assuming the CD in on your practice amp is two RCA sockets??!!). You don't need anything else than the correct cable to connect your drum machine (if that is what it is

) to your practice amp. The one thing that might be a small 'problem' is the volume output from the drum machine - just start the volume out at minimum and turn up slowly.
For sure, practicing with a drum machine is more interesting than with a metronome, and you can learn a lot about bass / drums interaction also.
Does this help?