You need an ISBN if you want your book to be available through booksellers, online retailers and libraries.
Print on demand services such as Amazon’s KDP or IngramSpark may offer free ISBNs, but there are disadvantages to using them, especially for print formats. Using a free ISBN will mean that the publisher imprint listed for your book will be that of the company you got it from, for example the publisher listed for your book would be Indy Pub if you use a free ISBN from IngramSpark. Meanwhile, if you buy your own ISBN you can publish your book under your own imprint and will be recognised as the ultimate owner of your work. Using a free ISBN may also limit where your book can be printed and distributed.
Do I need a different ISBN for each book?
If you buy an ISBN you can use it for one particular format no matter where you publish or sell it. If you have a paperback and a hardback you will need two ISBNs, one for the paperback, and one for the hardback, regardless of what print-on-demand channel these are published through. You may want to purchase a number of ISBNs at once instead of purchasing them individually as this is often considerably cheaper.
Where to get an ISBN from depends on which country you live in. In Canada people can get ISBNs from the government for free, but in other countries you will need to buy one from the ISBN distributor in your country. In the UK the official ISBN agency is Nielsen. In the US it is Bowker and in Australia it is Thorpe-Bowker. You can find information about official agencies in other countries from the International ISBN Agency.
Once you have your ISBN you should register the name of your book under it with your ISBN agency and give details about your book. This way an official central record will be created for your book associated with the ISBN number. Providing this information will improve the discoverability of your book.