Magnetic Impurities on a Superconductor: from Single Atoms to Coupled Chains