The ISBN number on the book you are reading is the visual representation of the internationally recognised book recognition system. Originating in the UK in 1970 this has spread across the world allowing authors, publishers, book sellers and libraries to identify any book anywhere in the world assuming it is in the system. Essentially any individual or organisation can use the number for order processing, sales tracking and stock control.
The number is unique to the book on which it is stamped in much the same way that a passport is unique to the holder. Originally a ten digit number, from 1st January, 2007, a thirteen digit number is assigned to every published book and new number is assigned to each and every edition of a specific title. So, a book that has five editions will have five distinct numbers allowing all concerned to ensure that they have obtained the precise edition they require.
The ISBN number is not random but one that consists of ten or thirteen digits divided into five groups separated by either a hyphen or a space. Each group provides discrete information with the number of digits in the middle three elements being variable but that of the first and fifth elements being fixed. The prefix element, either 978 or 979 simply identifies the item as being part of the publishing industry. The following Registration Group element identifies the country, geographic region or language area participating in the system. The third group of digits represents the Registrant element identifying a particular publisher or imprint within the Registration Group. The number of digits in this group varies inversely according to the likely output of a publisher. A larger publisher with 1000s of titles will be assigned a very short Registrant element whereas a self-publisher would have a large one. The Publication element identifies a specific edition of a book with the number of digits being proportional to the output of the publisher so that a self-publisher is likely to have only one digit. Any blank digits are represented by zero(s). The final part of the thirteen-digit number is the Check digit, which validates the rest of the number.
There is absolutely no legal requirement to register your book under the ISBN system and it conveys no copyright protection. Additionally there is an application process to go through and a fee that is well in excess of £100. However it is not something about which you should think twice and the cost is something that you must factor into the production costs of your book. It is perfectly possible to publish a book without an ISBN if you go down the path of using a local printer and selling from your own website. However you would be unlikely to make a profit and might well end up with a loss. No traditional or digital publisher will stock your book so unless you are simply producing a book to be distributed amongst family and friends you really do need an ISBN.
Try to avoid thinking of ISBN as a necessary evil requiring you to go through a registration process and pay a fee. The presence of an ISBN on your cover gives the book a feel of authenticity, of being a professionally produced publication. It is also a useful promotional tool because booksellers and libraries use the number to search catalogues and databases.
When you self-publish with companies like Createspace and Lulu they offer a range of packages including some where you use an ISNB provided by the company. While that might seem an attractive option there are a number of drawbacks and if you are serious about publishing a number of books you should obtain your own registration. That will help to establish your brand identify and credentials as an author to be taken seriously. Using a Createspace/Lulu ISBN makes a clear statement that you are a self-publisher rather than someone creating an independent imprint.