A series of molecular signals initiated by the binding of the cell surface receptor CD40 to one of its physiological ligands, and ending with regulation of a downstream cellular process, e.g. transcription.