Most of the companies that actually run an online gambling operation are offshore (not within the USA). The vast majority are located in the Carribean and the United Kingdom. (See the Legal Issues section for an explanation). It is best to check with the laws of the country your company is in for authority to own and operate a casino. Also, it is worthwhile to look at the TAX structure. Australia was taking 50% of all winnings from online casinos. This number was reduced to 8% after they realized Australians were gambling at online gambling operations located in other countries.
( One of the best books to read on starting an offshore corporation is Tax Haven Roadmap, by Richard Czerlau )
There are two types of licensing for running an online casino and sportsbook operation. First and foremost is the gaming license. This is a government license which grants authority to the casino and sportsbook establishment to take wagers and bets. The second is a software license. This is a license from an Online Gambling Software Provider to utilize their casino and sportsbook software. Further below is a list of companies that provide software.
Usually, each of these Online Gambling Software Providers have deals or arrangements with one or more offshore nations (agian, usually the Carribean / Latin America). Either they have the "Master License" or have access to the ability to getting you a gaming license. In most cases, A GAMING LICENSE IS REQUIRED from the state/country you are based in order to take wagers on the internet. Some governments do not require a gaming license, while others (like Antigua, Gibraltar, Malta, Isle of Man and Costa Rica) do. In the USA, Gaming Licenses are given within US States.
Usually the Internet Gambling Software Provider charges a software licensing fee. Most also take a percentage of the take for each month's revenues of the casino as well (otherwise known as a royalty fee). Some offer marketing services, while some require it as part of the agreement. Some offer equipment (ie: the server), while some require that it be purchased from them. Each of these companies have various structures but this all needs to be weighed out versus what they can offer in return. On average, most online casino and sportsbook business owners end up with 15 - 40% of the monthly profits.
Also what should be looked at is the type of software. Generally, there are 3 types: Download Based, JAVA and Flash. Each have advantages and disadvantages. To read more about this, click HERE and HERE.
The Wizard of Odds is an excellent reference as to how some of the online casino software providers' programs work (otherwise known as the basic "strategies" - see their GAMBLING ONLINE section).