What is the difference between a museum and a gallery

What is the difference between a museum and a gallery?

Art museums and art galleries are two different types of entities.

The primary difference is that while one goes to an art museum to view art, one goes to an art gallery to view art, from the perspective of purchasing the art.  

Most museums are funded by governments, foundations and corporate and private donors and are operated on a non-for-profit basis.  A few exceptions are museums like Guggenheim museum, which are operated more like businesses and are in fact franchising out like corporations.  These days you are also able to find corporations or high net worth individuals who operate their collections like museums for the public.  Some of these are for genuine interest in sharing their art collections with the public and others view it as a public relations or marketing strategy.  Some of the recent public collections in this realm are:  Saatchi Gallery by Charles Saatchi and Palazzo Grassi by Fancois Pinault.  
Art galleries, on the other hand, are usually small businesses that exhibit art for the purposes of promoting and selling art.  One would typically visit an art gallery to discover an artist, with an interest in buying the art.