Will magnets erase my hard drive or harm my computer?

Not unless you really work at it. While you probably don't want to stick magnets directly to your computer case, having them nearby will not harm your computer. Magnets can damage floppy disks and magnetic tape storage media, so you must keep magnets away from these items. They should not, however, damage any data on your hard drive unless you place a very large and powerful magnet directly on top of the drive.  Every hard drive already contains a powerful neodymium magnet, so one moving around outside the case will not affect the data.

What does the “N rating”, or grade, of the neodymium magnets mean?

The grade, or "N rating" of the magnet refers to the Maximum Energy Product of the material that the magnet is made from.  It refers to the maximum strength that the material can be magnetized to.  The grade of neodymium magnets is generally measured in units millions of Gauss Oersted (MGOe).  A magnet of grade N42 has a Maximum Energy Product of 42 MGOe.  Generally speaking, the higher the grade, the stronger the magnet.