The chemical reactions and pathways involving coenzyme A, 3'-phosphoadenosine-(5')diphospho(4')pantatheine, an acyl carrier in many acylation and acyl-transfer reactions in which the intermediate is a thiol ester.