A barcode allows a product and its price to be identified by scanning instead of manually typing letters and numbers. Scanning is faster and more accurate. Most book retailers and book wholesalers will require a barcode to stock your book.
Barcodes are used to identify retail products, using one of two systems: the UPC (Universal Product Code) or the EAN (European Article Number). The EAN system starts with a code for the product’s country of origin. It has been expanded to include books from all over the world by adding a category for an imaginary country called Bookland. The country code for Bookland is 978. All 13-digit ISBNs start with 978, and are thus made compatible with the EAN system.
The company Bar Code Graphics (which produces bar code labels in bulk quantities) has a nice explanation of this on their website.
If you have determined that you do not need an ISBN – because you are only selling your book through Amazon, at events, through a club website, etc. – then you are unlikely to need a barcode.
As of September 2014, you can use a free barcode generator provided by Bookow, a web-based formatting service for self-publishers.
In case Bookow ever discontinues this free service, barcodes can also be obtained (for a fee) from R.R. Bowker, the company that administers ISBNs in the U.S.
The barcode will arrive as an image file to be added to the back cover design of your book.