Print on demand is sometimes used interchangably with digital printing technology, although they are really somewhat different. Digital printing technology uses an industrial-sized laser printer to print whole books at a time. This is cheaper to use for small orders, but if you want to print 10,000 books, it's cheaper to do this with old-fashioned offset presses.
Digital printing technology, however, is often used with the print on demand business model. The normal publishing business model is to print up a couple thousand books, keep the books in a central warehouse, and sell the books to bookstores, who attempt to sell them to the public and return them for full credit to the warehouse if they don't sell. This is much the same way that Home Depot sells paintbrushes, except that the brush factory won't give them nearly so generous a return policy. With print on demand, however, the publisher only prints a book when someone, either a customer or a store, orders a copy. Normally these books are not returnable. It's kind of like the way Home Depot sells buckets of paint - you can walk in holding a colored object and they'll make the paint to order, but you can't bring it back for a refund.
Your typical print on demand shop isn't like a commercial publisher. They're more like a printing shop with a few sales tools. POD outfits don't buy books and market them like a commercial publisher. Instead, they are in the business of selling printing services to people who want to print and sell a book on their own. For someone who simply wants to print a short run of a particular book, this can be a good deal - the setup fees are less than with offset printing, and you can get another batch quickly if you need one.
While POD is good for the printer, it's not as easy on the customer. Since POD publishers usually print anything that they are paid to print (well, they may have rules against things like hate speech and so forth), there isn't any editorial staff to decide if a book is something readers will enjoy. A POD outfit will accept all sorts of manuscripts that a commercial publisher would turn down, and it often won't give them the same level of editing that a commercial publisher would. So the average quality of writing is lower. The books are also often impossible to return. This tends to discourage the general public from buying books from a POD publisher. Consequently, POD is not a good way to sell most fiction or general interest non-fiction.
POD publishing does have many valid uses, however. They are good for printing family stories that are of little interest to people outside the author's immediate family. If I made money on the lecture circuit, I could use a POD company to print up a stack of books to sell at my lectures. My father, a college professor, uses iUniverse to print course materials for his classes. It's also great for printing small runs of specialized nonfiction for small groups, like if the Miami Seashell Club wants to make a guide to the seashells of South Florida for its own members. But POD is not something you normally want to use to print books with mass appeal.