cAMP is synthesized from ATP by the enzyme adenylyl cyclase, which is activated by various signals such as hormones like adrenaline and glucagon. This activation occurs via G-protein-coupled receptors (GPCRs), which initiate a cascade resulting in the conversion of ATP to cAMP.