A business makes a deal to use/accept the CCards of a CC company. they sign a contract , that lays out the terms of that deal. LOTS of stuff, like charge rates, signage, etc., all of which can be seen online at the CC company website. Similar to the 'Terms of Use' and 'End User Agreements' for say, an 'ap' or Windows.
Not all businesses 'sigh up' for all credit cards, tranny shop down the road ONLY accepts cash or cheque ! Most though will take VISA and MC. Not many take AMerican Express or Diners Club up here...
There is no law, that I know , that says a business HAS to take creditr cards (tranny shop is my proof..) However it's been 'good business' for companies to accept 'plastic'. In most cases it's safer than taking a cheque.