Back in 1998 (through 2000 or so), I worked for a small company (called PaymentNet / then Signio) that handled online transactions. Verisign later purchased this company, and the product team I led integrated the "client" - the portion that took the credit card information and sent it to our servers for processing. The product name is Payflow Pro - maybe you've heard of it?
I'm going to limit this discussion to Visa / MasterCard credit cards -- Amex and others operate slightly differently.
First, there is the bank that the consumer's credit card is attached to. That bank is called the "acquiring institution" ... it handles the "credit" you have on your credit card.
Then, there is the merchant bank. That's where the business opens up a "merchant account" to be able to accept various forms of credit cards.
The merchant account is connected to another company called a "processor". This "hidden" layer is the company that actually moves the funds from the acquiring institution to the merchant account (that process is called "settlement"). The processor also handles talking to the acquiring institution to make sure that the customer has the funds available (a process known as authorization).
Some well-known credit card processors are First Data Merchant Services (FDMS), Nova and PaymentTech.
Sitting on top of the processor is one of two primary systems either a swipe-card terminal (like those you see in Wal-Mart) or a "gateway" company that does basically the same thing, but over the Internet - that's what Verisign Payment Services and Authorize.Net do.
Note that the waters are even muddier in many cases, for example, Wells Fargo can act as every piece of the puzzle in some circumstances.
So, what actually happens when you purchase something at Wal-Mart using a credit card?
a) You place your items from your "basket" onto the counter and scan them. the checkout system provides a total.
b) You swipe your card through a "terminal", which reads the # off the magnetic stripe.
c) Wal-Mart dials their processor, and asks if you have the funds available on your credit card. The processor talks to your bank (the acquiring institution). If funds are available on the card, they are marked as "held" in your account (an authorization) - if not, the transaction is declined (yuk). Authorizations that are never settled tie up your credit card funds for a period of time, usually 10 days or so.
d) At the end of the day, Wal-Mart marks all the transactions they want to receive funds for, and submits them to their processor in a "batch". The processor then contacts the acquiring institutions and transfers the funds to your merchant bank - which may make the funds available instantly (in a day or two), or may hold them for a while, or may hold the funds in a "rolling reserve" (keeping some funds held back in case a consumer fights the transaction, called a chargeback).
In the online world, replace the cash-register with an online shopping cart, and the electronic credit-card with terminal with called a "gateway" such as Payflow or Authorize.Net. the process is basically the same, with slightly more complexity.
Be careful going "a-la-carte" with ecommerce credit-card services: if the gateway you chose can't talk to the processor your bank uses, or your software can't talk to the gateway, you're hosed. That situation was MUCH more common (things not working together) back in the mid/late 90's than it is today. However, most "brick and mortar" banks (like your local branch) still don't have a clue about online credit-card processing ? if they attempt to sell you a "leased terminal", it's best to run the other way and find a solution from reputable online source.
As an online merchant looking to accept credit cards, all you really need to know is that all services purchased through a single solution will usually work together seemlessly.
Nick Temple is a former engineer for what is now Verisign Payment Services. He can be reached at his website, http://www.nicktemple.com. He is part-owner of the CommerceStore.com; complete online credit card ecommerce solution.
My site, CommerceStore.com handles the entire "shopping cart" and storefront process, including talking to the gateway. It knows how to talk to every major gateway (online credit card terminal) available. In addition, we have direct relationships with various banks that can help you open a merchant account in the US or in Canada, and the system works with PayPal. There's a whole lot more, including AutoResponders, built-in affiliate system, etc.