I was told that leaving magnets near CDs and DVDs could cause recorded information to be erased. It's right?
Is not true. The magnets erase information that is recorded on magnetic media such as floppy disks, hard drives, tapes, etc. In the case of CDs and DVDs the recording is done by optical means, ie they are regions of the disc that are burned by a LASER. Thus, once recorded the information of CDs and DVDs are not affected by magnetic means such as the presence of magnets. They are rather affected by direct mechanical means such as scratching or warping the disc.