In the case of music, the RIAA (the trade group that represents the music industry) isn't exactly thrilled by the idea of people ripping CDs for their own use, but it isn't going after them, either. Indeed, the issue cropped up when a major newspaper incorrectly reported that the RIAA was suing a listener for merely ripping music tracks off a CD; the RIAA made it clear that it was going after the defendant for putting those tracks in a P2P file-sharing folder, not for the ripping itself. The RIAA stopped short of saying it actually approves of CD ripping for personal use, but for now, the group seems content to let it go. And most likely they would lose a legal battle on that front if they tried it.
Ripping DVD movies is a different issue, however. Thanks to the Digital Millennium Copyright Act of 1998, it is illegal to crack digital rights management schemes (a.k.a., our old friend DRM) regardless of how you plan on using the protected content. While music CDs don't come with copy protection (although there were a few misguided attempts to do so), just about any copyrighted DVD in your local video store is encrypted by a DRM scheme called CSS (Content Scramble System). If you crack CSS encryption to copy a DVD to your hard drive or iPod (and most DVD-ripping utilities out there do just that), strictly speaking, you're in violation of the DMCA. The DMCA would seem to conflict with the "fair use" provisions of standard copyright law, but how (and whether) fair use applies to ripping "backup" copies of DVDs remains unclear, and there have been no definitive legal rulings to point the way. (One potential test case—a lawsuit filed against the makers of a digital movie jukebox by the movie industry—has turned into a twisty, back-and-forth battle, with no clear winners or losers.)
So, to summarize: copying CDs for your personal use is fine. Ripping DVDs? You probably won't get hauled into court for putting a movie onto your iPod, but if you really want to know...yeah, you're wading into murky legal waters.