The chemical reactions and pathways involving a cephalosporin, any of large class of tetracyclic triterpene broad-spectrum antibiotics similar both chemically and in their mode of action to penicillin, first isolated from the culture filtrates of med.