Digital Rights Management (DRM) is Amazon's method of physically preventing users from copying its Kindle book files. DRM means you can only read a protected book on a Kindle (or device running a Kindle app) linked to your Amazon account. Not all books have DRM but those that do will usually have a limit on how many devices you can use the book on over time.
Amazon's book sales work on a similar basis to a lot of computer software: you do not strictly buy the book but rather purchase a license to read the book on one or more devices. To enforce this, Amazon puts DRM code within the book file itself. This code has to match the specific Kindle device before you can open and read the book.
It is up to the publisher whether a book should have DRM. If it does, you will be limited in the number of Kindle devices (or devices running the Kindle app) on which you can access the book. If you reach this maximum, you will need to contact Amazon customer service to take an existing device off the list. You can only view a DRM book on a Kindle or other device that is linked to your Amazon account. Amazon also has the ability to remotely delete books that have DRM. It has only done this once, in a copyright dispute involving George Orwell's 1984, and created such a controversy that the company said it did not intend to do so again in similar cases in the future.
There is no sure-fire way to tell if a Kindle book has DRM, though a good rule of thumb is to assume that any book out of copyright (and available through the Kindle store without charge) does not have DRM while any book you pay for likely does have DRM. If a book's listing in the Kindle store mentions a limit on how many devices it can be used on, this is a strong sign that it has DRM.
The legality of tampering with, removing or bypassing copy protection such as Amazon's DRM varies from country to country. In the United States, doing so will breach the Digital Millennium Copyright Act. This law not only makes it illegal to copy digital files without permission, but it also makes it illegal to circumvent copy protection measures, whether or not you then go on to copy a file.
Other Formats and Sellers
Amazon's DRM only affects books you buy through the Kindle store. You can add other electronic books in a variety of formats to your Kindle reader, either through a file manager program when the Kindle is connected to your computer or by sending them to a dedicated email address that will then forward the file to your Kindle wirelessly. Such books are not protected by DRM, meaning there is no restriction on which or how many Kindles you can put them on. However, books and other files that you copy to your Kindle through the connection are not part of your online library, meaning that you can't automatically restore them if you lose or replace your Kindle. Files that you send via email are part of the Kindle library and can be restored.