This infographic does a great job of explaining how credit card processing fee work.  Everything from who is getting paid between the merchant provider and credit card carrier, to examples of average fees and rates for processing credit card transactions.