I found the answer at http://www.wisegeek.com/what-is-a-credit-card-gateway.htm, and hope it is useful for someone who read this article :D
A credit card gateway is one element of a suite of e-commerce
software packages that when incorporated into a website, allow for
online shoppers to pay for goods and services with VISA, MasterCard,
Discover, American Express or ATM debit card. To purchase items online, visitors add products to a virtual
"shopping cart" that holds item(s) while calculating a running tab of
charges. The shopping cart is provided by the host's e-commerce
bundle which can run anywhere from $50 - $100 per month, or more
depending on features. The customer clicks a "checkout" or "buy" button
when shopping is complete, and is transferred to a page generated by a
secure server. This server houses the credit card gateway. All data passed between the secure server and the customer's computer is encrypted
en route and only decrypts at the destination point. Before negotiation
starts, the secure server passes a certificate of authenticity to the
customer's browser to verify its legitimacy and identity. If there are
any problems with the certificate, the browser alerts the customer not
to continue with the transaction. Assuming this "handshake" goes well, the customer then supplies name, address and credit card
information and clicks "send" or "submit". The information is encrypted
by the browser then sent to the secure server and decrypted upon
arrival. The software protocols in the credit card gateway use the information provided to check for availability of funds and to make sure the credit card
is not expired, lost or stolen. This takes only seconds. When the
transaction is approved a receipt is generated for the customer, and
the funds are transferred to the vendor's bank account.