Do they get them from stores, or do they set up a distributor? Also, is it cheaper than getting the beer from a store?
Some businesses (brew pubs and brewery taps for example) produce their own so don't have to buy it. Most businesses (pubs, bars, restuarants etc.) order from a wholesaler or cash-and-carry in the same way that they order pretty much everything else, or they may order direct from the brewery or an distributors. The prices are wholesale price so cheaper than they would be in a store so that they make a profit. I help to run a beer festival in the UK and we tend to order our beers from distributors or direct from the brewery (we know most of the 50+ breweries in London well enough that a few donate some barrels as well as we are a not for profit organization). A distributor works partially as a broker between breweries and buyers and partially as a wholesaler, the difference is that they tend to keep the beer at the brewery and only pick it up and transport it to fulfill an order. One of the distributors that we use is FlyingFirkin http://www.flyingfirkin.co.uk/ , just to give you some idea of how it works. Additionally, in the UK, duty is paid at point of sale so VAT is paid on the beer when it is bought from the supplier but duty is only applied when it is sold to the end user, or "drinker", and so the price paid from the supplier will be significantly lower.
This depends on a few things (mostly the location & regulations associated with). Sometimes breweries will be able to sell directly to liquor stores, pubs and so on, they may also have to go through a liquor distribution board (LDB). (And as breweries expand it is most defiantly worth it to go through a LDB or other distributor, as you can't be making sales calls to the other side of a country to deliver a 20L keg.)
From my experience, businesses will generally contact or be contacted by a sales rep who will take care of them. Somewhat surprisingly, a lot of new-ish pubs and bars will actually be provided with very low cost or even free beer (or other alcohol) on the condition that only that brand will be on tap for x amount of months/years. This generally happens with bigger breweries. Pubs also will sometimes sell taps to breweries.
In terms of cost, no, it wouldn't be cheaper for a pub to go the the local liquor store and buy the beer there (might be 20%+ more expensive). When a brewery sells to a organization (pub, restaurant, liquor store etc.) it is generally at a 18-26% discount so that it can then be marked up by the pubs at a reasonable price.
A lot of this is the same sort of way that pubs get their chicken wings, just more heavily regulated.
In Belgium, you have the breweries itself that distribute their beer. They have a large collection of different beers (and even soda, cola,..). When you open a pub, you can choose to buy directly from the brewery. You will have lower prices and you have to possibility to get parasols, cards, logo's, chairs, tables, ... with the logo of one of their beers.
If you don't choose to buy from the brewery, you can buy from a local distributer and compose your own beer-list. But no perks this way and it is more expensive.